Actually I'm not able to get the correct ouput, formating a float number, not knowing what's going wrong:
(no problems when using int, DWORD and strings)
#include <stdio.h>
void func(void)
{
char c[25];
float f = 2.5;
sprintf(c, "%5.2f", f );.
}
expected output: " 2.50"
but I get always "-..0" (or anything else what makes no sense)
If tried several variants but I never get a correct result. May be I link a wrong lib or is there any additional type cast necessary?
Any help very appreciated! Thank you very much.
Best regards
Ralph