When I write a simple wprintf function and pass a double to it a float number using the verb notation L"%.2f" it simply prints an "f" on the screen instead of a number like in the format 0.00.
I would like some help as everywhere I look it simply says L"%.2f" is the way to print a number with 2 decimal digit precision.
float duration = (float)((std::clock() - mTimer) / (float)(CLOCKS_PER_SEC / 1000));
wsprintf(message, L">> Speed: %.2f\r\n", duration);
These are the 2 lines causing my headache... they result in
>> Speed: f
being printed on the console.
The output i'm looking for is this:
>> Speed: 4000.00
wsprintf()? There's aswprintf()in the standard, but it takes different arguments...swprintf()option in the end. But i will look in to the MSDN info you provided, i only code as a hobby so i'm not really trained or a professional lol. All the information i can get it much appreciated. Thank you Shawn