'WinMain' : function cannot be overloaded
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的更多相关文章
- 创建Windows窗体 : WinMain() 与 WndProc()
#include <windows.h> #include <mmsystem.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, ...
- Google C++ Style Guide
Background C++ is one of the main development languages used by many of Google's open-source project ...
- LLVM example for main
#include "llvm/IR/CallSite.h" #include "llvm/IR/Instruction.h" #include "ll ...
- 让gcc支持成员函数模板的trick
让gcc支持成员函数模板的trick 罗朝辉 (http://www.cnblogs.com/kesalin/) 本文遵循“署名-非商业用途-保持一致”创作公用协议 gcc 4.7.3 不支持成员 ...
- [转载]触发ASSERT(afxCurrentResourceHandle != NULL)错误的原因
触发ASSERT(afxCurrentResourceHandle != NULL)错误的原因 Debug Assert error afxwin1.inl line:22 翻译参考 http://w ...
- [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 ...
- (转)MFC中获得各个类的指针/句柄 ID的总结
http://www.cnblogs.com/ylhome/archive/2009/10/06/1578478.html 一般我们使用的框架是VC提供的Wizard生成的MFC App Wizard ...
- c# 隐藏 控制台应用程序
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...
- WPF single instance
转自:http://www.cnblogs.com/z_lb/archive/2012/09/16/2687487.html public partial class App : Applicatio ...
随机推荐
- Codeforces Gym 100513D D. Data Center 前缀和 排序
D. Data Center Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/560/proble ...
- poj 1087 C - A Plug for UNIX 网络流最大流
C - A Plug for UNIXTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contes ...
- 现在的SEO最须要会点啥
如今的SEO最须要会点啥,会飞天,会遁地,NONONO,不须要你这么流弊,咳咳,不瞎扯.在以往SEO的就是从搜索引擎中获取免费流量.是啊,曾经多好弄啊.而如今在我们不但须要流量还须要把流量进行转换,毕 ...
- zookeeper作为soa服务器集群的协调调度服务器
zookeeper作为soa服务器集群的协调调度服务器,当然自身也支持集群. ZooKeeper搭建系列集 ZooKeeper系列之一:ZooKeeper简介 ZooKeeper系列之二:ZooKee ...
- Android 滑动效果进阶篇(六)—— 倒影效果
上篇介绍了使用Animation实现3D动画旋转翻页效果,现在介绍图片倒影实现,先看效果图 本示例主要通过自定义Gallery和ImageAdapter(继承自BaseAdapter)实现 1.倒影绘 ...
- ConfigurationManager.GetSection()方法的使用
GetSection方法读取的是configSections节点,这个节点在web.config配置文件中,它比较特殊,必须放置于首节点,也就是说,在它之前不能有其它类型的节点.configSecti ...
- xtrabackup原理1
http://www.cnblogs.com/Amaranthus/archive/2014/08/19/3922570.html Percona XtraBackup User Manual 阅读笔 ...
- Linux下*.tar.bz2等文件如何解压--转
如果tar不支持j这个参数就先用 bzip2 -d xxx.tar.bz2 把它解压成.tar文件,然后再用 tar xvf xxx.tar 拆包.压缩解压 linux下怎么解后缀名是gzip的文件? ...
- 琐碎-关于StringTokenizer工具
属于:java.util包 构造函数: 1. StringTokenizer(String str):构造一个用来解析str的StringTokenizer对象.java默认的分隔符是“空格”.“制表 ...
- 解决ajax回调函数无返回值得问题
这里以编辑验证角色名为例: 首先,定义一个flag全局变量. 然后,在回调函数resp()中根据判断将flag的值设为true或false. 最后,在调用函数ckrname()中,return fla ...