im havin probs with this bit of code:
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;
}
}
my IntToString function looks like this:
Code:
std::string IntToString(int num)
{
std::ostringstream ITS;
ITS << num;
return(ITS.str());
}
FPSCount starts as a value of 0
FPS_TIMER has a valuue of 1
FPS_INTERVAL has a value of 1000
ive included the following:
Code:
#include <math.h>
#include <windows.h>
By the way i got these errors all in that function:
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!