error C2731: 'WinMain' : function cannot be overloaded

 

Solution:

Change

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)

 

To

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)

 


 error C2440: '=' : cannot convert from 'const char [15]' to 'LPCWSTR'

 

Solution:

It wants wide strings, but you're passing it normal character arrays.
Project -> Properties -> Configuration Properties -> General -> Character Set
Set that setting to Use Multi-Byte Character Set

 

 

posted on 2010-02-21 23:59  Gil  阅读(167)  评论(0)    收藏  举报