'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 ...
随机推荐
- 第一周:读取XML深度数据并将其重建为三维点云
本周主要任务:学习PCL点云库,掌握利用PCL对点云处理的方法 任务时间:2014年9月1日-2014年9月7日 任务完成情况:完成了读取单幅xml深度数据,并重建三维点云并显示 任务涉及基本方法: ...
- Nhibernate中 Many-To-One 中lazy="proxy" 延迟不起作用的原因
2010-07-15 12:10 by 彭白洋, 322 阅读, 0 评论, 收藏, 编辑 NHibernate中 Many-To-One 中lazy="proxy" 延迟不起作用 ...
- 详解C/C++函数指针声明 ( *( void(*)())0)();
( *( void(*)())0)(); float *pf; 这个声明的含义是*pf是一个浮点数,也就是说,pf是一个指向浮点数的指针. float *g() , (*h)(); 表示*g()与( ...
- redo log write和flush
http://bbs.chinaunix.net/thread-1753130-1-1.html 在事务提交时innobase会调用ha_innodb.cc 中的innobase_commit,而in ...
- redis终于有比较大的进展了,redis3.0.1 稳定版本发布,支持集群。
原文地址:https://raw.githubusercontent.com/antirez/redis/3.0/00-RELEASENOTES Redis 3.0 release notes --[ ...
- 每天2个android小例子----简单计算器源代码
通过Android4.0 网格布局GridLayout来实现一个简单的计算器界面布局 package com.android.xiong.gridlayoutTest; import java.mat ...
- python学习笔记 class
在这段时间中学习python在里面绕来绕去晕了. class和其他的语言都差不多,但是我理解中其实class和function差不多,只是将function封装起来. 在python中第一个class ...
- Windows 之 删除文件出现“该项目不在请确认该项目的位置”
原理为通过 DOS 命令自建一个 .bat 批处理文件. 第一步,首先桌面新建TXT文档: 第二步,主要使用DEL 和 RD 命令,打开文档复制下面内容里面: DEL /F /A /Q \\?\%1 ...
- 两个UIView添加同一个手势只有最后一个有用
首先这个思路是不对的,因为每一个Gesture Recognizer关联一个View,但是一个View可以关联多个Gesture Recognizer,因为一个View可能还能响应多种触控操作方式.当 ...
- [改善Java代码]由点及面,一叶知秋----集合大家族
Java中的集合类实在是太丰富了,有常用的ArrayList.HashMap,也有不常用的Stack. Queue,有线程安全的Vector.HashTable,也有线程不安全的LinkedList. ...