M
MyCatAlex
Guest
I have this code and I need to output a debug counter. This could be a piece of cake in C# but in C++.... I tried to figure it all out by myself but it does not seem to be possible. Look:
INT MessageLoop(HWND hwnd)
{
MSG msg = {0};
int counter = 0;
// could be the place to catch individual frames
while (GetMessage(&msg, NULL, 0, 0))
{
counter = +1;
std::cout << "counter = " + counter + std::endl; // <== cannot determine which instance of function template "std::endl" is intended
std::cout << "counter = " + counter + " \n"; // <== Expression must have an integral or unscoped enum type
TranslateMessage(&msg);
DispatchMessage(&msg);
}
DestroyWindow(hwnd);
return INT(msg.wParam);
}
The error messages are highlighted. They come up during compilation. Why?
Thanks, - MyCatAlex
Continue reading...
INT MessageLoop(HWND hwnd)
{
MSG msg = {0};
int counter = 0;
// could be the place to catch individual frames
while (GetMessage(&msg, NULL, 0, 0))
{
counter = +1;
std::cout << "counter = " + counter + std::endl; // <== cannot determine which instance of function template "std::endl" is intended
std::cout << "counter = " + counter + " \n"; // <== Expression must have an integral or unscoped enum type
TranslateMessage(&msg);
DispatchMessage(&msg);
}
DestroyWindow(hwnd);
return INT(msg.wParam);
}
The error messages are highlighted. They come up during compilation. Why?
Thanks, - MyCatAlex
Continue reading...