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 LPSTR.

Or, include  Windows.h and tchar.h

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

'WinMain' : function cannot be overloaded的更多相关文章

  1. 创建Windows窗体 : WinMain() 与 WndProc()

    #include <windows.h> #include <mmsystem.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, ...

  2. Google C++ Style Guide

    Background C++ is one of the main development languages used by many of Google's open-source project ...

  3. LLVM example for main

    #include "llvm/IR/CallSite.h" #include "llvm/IR/Instruction.h" #include "ll ...

  4. 让gcc支持成员函数模板的trick

    让gcc支持成员函数模板的trick 罗朝辉 (http://www.cnblogs.com/kesalin/) 本文遵循“署名-非商业用途-保持一致”创作公用协议   gcc 4.7.3 不支持成员 ...

  5. [转载]触发ASSERT(afxCurrentResourceHandle != NULL)错误的原因

    触发ASSERT(afxCurrentResourceHandle != NULL)错误的原因 Debug Assert error afxwin1.inl line:22 翻译参考 http://w ...

  6. [Under the hood]---Matt Pietrek October 1996 MSJ

    Matt Pietrek October 1996 MSJ Matt Pietrek is the author of Windows 95 System Programming Secrets (I ...

  7. (转)MFC中获得各个类的指针/句柄 ID的总结

    http://www.cnblogs.com/ylhome/archive/2009/10/06/1578478.html 一般我们使用的框架是VC提供的Wizard生成的MFC App Wizard ...

  8. c# 隐藏 控制台应用程序

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  9. WPF single instance

    转自:http://www.cnblogs.com/z_lb/archive/2012/09/16/2687487.html public partial class App : Applicatio ...

随机推荐

  1. Android多媒体应用开发-控制摄像头拍照

    现在的手机的功能可谓是五花八门,手机照相功能就是特别突出的一点,现在的手机照相机甚至成了专业数码照相机,可以拍摄出清晰的照片和录制高分辨率的视频.Android操作系统呢,提供了相应的功能来控制拍照: ...

  2. PS将图标变灰

    方法一:直接去色,图像——调整——去色:快捷键ctrl+shift+U 方法二:图像——调整——灰白:快捷键shift+ctrl+alt+B;

  3. Web Navigation

    Description Standard web browsers contain features to move backward and forward among the pages rece ...

  4. Javascript与Ajax

    不使用jquery来处理ajax请求该怎么做? 首先要明确html中的某些数据需要从服务端获得,也就是客户端向服务端请求(request)数据,服务端就响应(response)这个请求,把客户端要的数 ...

  5. CF Covered Path (贪心)

    Covered Path time limit per test 1 second memory limit per test 256 megabytes input standard input o ...

  6. [改善Java代码]集合中的元素必须做到compareTo和equals同步

    实现了Comparable接口的元素就可以排序,

  7. [改善Java代码]小心switch带来的空值异常

    使用枚举定义常量时,会伴有大量的switch语句判断,目的是伪类每个枚举项解释其行为,例如: public class Client { public static void main(String[ ...

  8. 【欧拉定理】计算(a^(b^c))%1000000007

    欧拉定理(称费马-欧拉定理或欧拉 函数定理) 欧拉定理表明,若n,a为正整数,且n,a互素(即gcd(a,n)=1),则 这个定理可以用来简化幂的模运算.比如计算7222的个位数,实际是求7222被1 ...

  9. 转: android编译过程(流程图)

  10. 把mvc4彻底搞定(一)

    1 .net web开发方式 webform开发 asp.net mvc开发 2 请求模式 webform方式:客户端向服务端请求一个aspx页面,服务端生成一个页面对象类,调用这个页面对象类的PR方 ...