YourSurrogateGod
February 15th, 2005, 10:00 AM
I get the below error right after the declaration of the WinMain method saying that I'm trying to overload the method :ehh: . I'm using .NET.
Why am I getting this error?
#include <windows.h>
bool full_screen = true;
int WINAPI WinMain(HINSTANCE h_instance, HINSTANCE h_prev_instance, LPCSTR lp_cmd_line,
int n_cmd_show)
{
MSG msg;
bool run = false;
if(MessageBox(NULL, "Would you like to run in full-screen mode?", "Full screen?",
MB_YESNO | MB_ICONQUESTION) == IDNO)
{
full_screen = false;
}
return 0;
}
Error:
c:\Documents and Settings\Andrew\My
Documents\opengl_test\opengl_test\
opengl_test.cpp(18): error C2731: 'WinMain'
: function cannot be overloaded
[edit]
Too early :rolleyes: . I got it.
Why am I getting this error?
#include <windows.h>
bool full_screen = true;
int WINAPI WinMain(HINSTANCE h_instance, HINSTANCE h_prev_instance, LPCSTR lp_cmd_line,
int n_cmd_show)
{
MSG msg;
bool run = false;
if(MessageBox(NULL, "Would you like to run in full-screen mode?", "Full screen?",
MB_YESNO | MB_ICONQUESTION) == IDNO)
{
full_screen = false;
}
return 0;
}
Error:
c:\Documents and Settings\Andrew\My
Documents\opengl_test\opengl_test\
opengl_test.cpp(18): error C2731: 'WinMain'
: function cannot be overloaded
[edit]
Too early :rolleyes: . I got it.