im havin probs with this bit of code:
my IntToString function looks like this:Code:case WM_TIMER: { if (wParam == FPS_TIMER) { FPSCount = round(FPSCount * 1000/FPS_INTERVAL); SetWindowText(hWnd, (WND_TITLE + " [" + IntToString(FPSCount) + " FPS]")); FPSCount = 0; return 0; } }
FPSCount starts as a value of 0Code:std::string IntToString(int num) { std::ostringstream ITS; ITS << num; return(ITS.str()); }
FPS_TIMER has a valuue of 1
FPS_INTERVAL has a value of 1000
ive included the following:
By the way i got these errors all in that function:Code:#include <math.h> #include <windows.h>
411 C:\Documents and Settings\Admin\Desktop\Programmin\Conversions\temp late1.5\Main.cpp expected primary-expression before '=' token
413 C:\Documents and Settings\Admin\Desktop\Programmin\Conversions\temp late1.5\Main.cpp expected primary-expression before '=' token
414 C:\Documents and Settings\Admin\Desktop\Programmin\Conversions\temp late1.5\Main.cpp expected primary-expression before '=' token
414 C:\Documents and Settings\Admin\Desktop\Programmin\Conversions\temp late1.5\Main.cpp invalid operands of types `const char[43]' and `const char[7]' to binary `operator+' << this has to do with SetWindowText()
all the other ones have to with all the =' signs
Thanks!



LinkBack URL
About LinkBacks



