首页 > Windows开发 > 详细

'WinMain' : function cannot be overloaded

时间:2015-10-12 19:06:27      阅读:330      评论:0      收藏:0      [点我收藏+]

 

 Create a MFC Application (UNICODE), paste following code in one of your cpp file.

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

{ return TRUE }

  

 Build project and following error occurred:

Error	1	error C2731: ‘WinMain‘ : function cannot be overloaded	D:\Test\CopyFiles\CopyFiles.cpp	37	1	CopyFiles

 

Solution:

Change the third parameter type "LPTSTR" to LTSTR.

Or, include  Windows.h and tchar.h

 

Reference: http://www.cplusplus.com/forum/windows/79761/

 

'WinMain' : function cannot be overloaded

原文:http://www.cnblogs.com/cindy-hu-23/p/4872299.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!