int num = 321; char snum[5]; // convert 123 to string [buf] itoa(num, snum, 10); // print our string printf("%s\n", snum);. If you want to output your structure ... ... <看更多>
If you can use C standard library functions, sprintf() should handle the string conversion. Instead of adding the decimal point by shuffling characters ... ... <看更多>