float j=1.73;
wchar_t buf[50];
wsprintf(buf,L"%f",j); //questa produce f
wsprintf(buf,L"%d",j); //questa produce -2147483648
![]()
float j=1.73;
wchar_t buf[50];
wsprintf(buf,L"%f",j); //questa produce f
wsprintf(buf,L"%d",j); //questa produce -2147483648
![]()
La wsprintf non supporta i float / double
codice:float j=1.73; wchar_t buf[50]; wsprintf(buf, L"%d", (int)j); wprintf(L"%s\n", buf);
ma gli interi
No MP tecnici (non rispondo nemmeno!), usa il forum.
ho risolto con:
swprintf(buf,L"%f",j);
grazie