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. ListView返回选中的多项目

    ListView返回选中的多项目     procedure TForm1.Button3Click(Sender: TObject);var  s: string;  I: Integer;begi ...

  2. Android多媒体数据库之MediaStore研究

    应网友要求,今天给大家讲android的多媒体数据库.MediaStore这个类是android系统提供的一个多媒体数据库,android 中多媒体信息都可以从这里提取.这个MediaStore包括了 ...

  3. [Angular 2] More on *ngFor, @ContentChildren & QueryList<>

    In previous artical, we introduce the how to use *ngFor. The limitation for previous solution to dis ...

  4. Android横竖屏切换处理

    Android横竖屏要解决的问题应该就两个: 1.布局问题:2.重新载入问题   一.布局问题: 如果不想让软件在横竖屏之间切换,最简单的办法就是在项目的AndroidManifest.xml中找到你 ...

  5. MySQL 灵异事件一则 -- desc报语法错误

    今天有一开发同学找到我,说查询SQL中倒序报错,不明原因,于是奔赴工位现场研究情况. 果然,只要SQL中带有desc 就会报错,而ASC没问题. 哪怕desc放在句首用作explain也会报错. 报错 ...

  6. js new date详解

    创建一个日期对象: var objDate=new Date([arguments list]); var ini_date=new Date(2014,7,0); //是代表7月最后一天 ,也就是2 ...

  7. CollatingOfData 之 JsonHelper

    1 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System. ...

  8. Windows Service 之 详解(二)

    一.创建 Windows 服务程序 1.文件 → 新建 → 项目 → 选择 Windows 服务模板,创建 WinService 项目: 选择这个服务的属性,可以打开属性对话框.可配置如下值: [1] ...

  9. 一网打尽OkHttp中的缓存问题

    看到很多小伙伴对OkHttp的缓存问题并不是十分了解,于是打算来说说这个问题.用好OkHttp中提供的缓存,可以帮助我们更好的使用Retrofit.Picasso等配合OkHttp使用的框架.OK,废 ...

  10. jquery-ui autocomplete 自动完成功能

    效果图