I have the following code:
char buf[255]; int ID = 0; double val = 1.234; sprintf(buf, "% d@ %.3lf", ID, val); printf("%s", buf);
printf() correctly prints the ID value, but the val value is just garbage. Do you know what causes this problem? I am using MSVC 9 on Win7 32-bit. Even stranger, the above code works correctly on a 64-bit machine.
Thanks in advance for your help.
source share