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. Codeforces Gym 100286I iSharp 水题

    Problem I. iSharpTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/ ...

  2. C#.NET开发ActiveX控件

    最近刚开发了个activeX控件,下面是我的一些简单总结. 1. 先创建一个类库项目,在AssemblyInfo.cs设置 [assembly: ComVisible(true)] ,意思是使此程序集 ...

  3. 使用C# 生成word记录

    private void button1_Click(object sender, System.EventArgs e) { object oMissing = System.Reflection. ...

  4. 算法:排序----Java选择排序

    public static void selectionSort(int[] arr) { int len = arr.length; for (int i = 0; i < len; i++) ...

  5. [Mapreduce]eclipse下写wordcount

    上传两个文件到hdfs上的input目录下 代码例如以下: import java.io.IOException; import java.util.StringTokenizer; import o ...

  6. android 访问SMS短信收件箱

    访问 SMS收件箱是另一个常见的需求.首先,需要将读取 SMS 的权限   <uses-permission android:name="android.permission.READ ...

  7. dubbo-RPC学习(二) http protocol

    dubbo中的协议默认支持很多种,从简单的开始,先解读HttpProtocol吧. dubbo中的http-RPC基于spring web支持的http invoker,web容器默认使用jetty. ...

  8. apache 配置order allow deny讲解

    http://www.111cn.net/phper/apache/43025.htm

  9. yar

    <?php class Operator { /** * 两数相加 */ public function add($a, $b) { return $this->_add($a, $b); ...

  10. Android(java)学习笔记80:UDP协议发送数据

    UDP协议发送数据:我们总是先运行接收端,再运行发送端发送端: 1 package cn.itcast_02; import java.io.IOException; import java.net. ...