Chat freely about anything...

User avatar
By dkinzer
#30416
ashubhatt wrote:It returns uint32 datatype, how to convert this into a string or char*??
It is just a numeric value. In what form would you like it - decimal? hexadecimal? octal? Generally, one uses sprintf() to convert a numeric value to an equivalent sequence of characters but that function is "heavy" in that it contains code for formatting lots of different values (e.g. double, integer, character) in many different ways. Also, sprintf() has no buffer overrun protection so one must be careful using it. An alternate form, snprintf(), does . There are more special purpose routines that have more limited functionality and are, therefore, more lean. One example is itoa()