'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 ...
随机推荐
- 解决mac的日历问题:服务器响应一个错误
出了一个问题好久,平时也不用这个同步不靠谱的日历.今晚花点时间解决了下. 参考Apple 官网日历的问题解答. 当出现如下情况时: 退出日历和提醒事项. 从 Apple () 菜单中选取“系统偏好设 ...
- Linux 内核动态函数调用可视化工具
要求: python .7以上 https://www.python.org/ftp/python/ EG:wget --no-check-certificate https://www.python ...
- centosx64位寄存器
[root@monitor ~]# uname -aLinux monitor 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 20 ...
- C++函数的传入参数是指针的指针(**)的详解
要修改变量的值,需要使用变量类型的指针作为参数或者变量的引用.如果变量是一般类型的变量,例如int,则需要使用int 类型的指针类型int *作为参数或者int的引用类型int&.但是如果变量 ...
- sizeWithFont 不是线程安全。
在ios开发中经常使用用sizeWithFont 方法来计算UILabel 的frame, 例如动态计算UITableViewCell 的高度,在主线程处理没有问题,但是在子线程用此方法来计算就会出现 ...
- Objective-C基础笔记一
这里开始了我OC旅程 花了8天的时间粗略的学习了新知识Objective-C(简称OC),虽然只是学习了其中的基础部分,但经过这一周的学习也算是入门了.对面向对象的封装.继承.多态以及其中所包含的方法 ...
- CSS skills: 6) auto hide the top bar javascript
//jquery $(document).ready(function(){ $(window).scroll(function() { $(this).scrollTop() > 10 ? $ ...
- jQuery实例属性和方法
jQuery.fn = jQuery.prototype = { //添加实例属性和方法 jquery : 版本 constructor : 修正指向问题 init() : 初始化和参数 ...
- FTP服务详解
FTP服务 本章机构 简介 File Transfer Protocol(文件传输协议)的英文简称,而中文简称为"文件传输协议".用于Internet上的控制文件的双向传输.同时, ...
- [改善Java代码]使用package-info类为包服务
建议50: 使用package-info类为包服务 Java中有一个特殊的类:package-info类,它是专门为本包服务的,为什么说它特殊呢?主要体现在3个方面: (1)它不能随便被创建 在一般的 ...