'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 ...
随机推荐
- BZOJ 3505: [Cqoi2014]数三角形 数学
3505: [Cqoi2014]数三角形 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline/pr ...
- TreeView节点拖拉操作
//这个拖拽的感觉不对 unit Unit1;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, ...
- android短信发送器源代码
Activity类: import java.util.List;import android.app.Activity;import android.app.PendingIntent;import ...
- memset用法详解(转)
问题描述: int * cow = new int[n+1]; memset(cow,0,(n+1)*4); 将N+1个元素置成0,为什么不行 memset是对一个字节的int4个字节,因此*4 但是 ...
- 高级I/O之非阻塞I/O
http://www.cnblogs.com/nufangrensheng/p/3515035.html中曾将系统调用分成“低速”系统调用和其他系统调用两类.低速系统调用是可能会使进程永远阻塞的一类系 ...
- LeetCode: Binary Tree Traversal
LeetCode: Binary Tree Traversal 题目:树的先序和后序. 后序地址:https://oj.leetcode.com/problems/binary-tree-postor ...
- [转]UINavigationController 返回的方法汇总
[html] view plaincopy [self.navigationController popViewControllerAnimated:YES]; UINavigationControl ...
- 非托管C++通过C++/CLI包装调用C# DLL
项目中要给其它客户程序提供DLL做为接口,该项目是在.Net4.0平台下开发.终所周知.Net的各个版本之间存在着兼容性的问题,但是为了使用高版本运行平台的新特性,又不得不兼顾其它低版本平台客户程序的 ...
- Index Generation
Index Generation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 230 Accepted: 89 Des ...
- 解决TableView / ScrollView上的Menu问题(1滑出View区域还可点击2导致点击menu后View不能滑动)
解决TableView / ScrollView上的Menu问题 1划出区域还可点击 重写CCMenu的触摸事件函数 TouchBegin/TouchMove/TouchCancle/TouchEnd ...