微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

了解Visual C控制台项目中的_tmain

在Visual C 2008 Express中,当我创建一个新的控制台项目时,我得到以下程序:
//Explodey.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

int _tmain(int argc,_TCHAR* argv[])
{
  return 0;
}

我有几个问题:

>为什么main函数_tmain而不是main?
>我以为argv参数应该是char * argv []而不是_TCHAR.
>什么是stdafx.h?

这真的不像我习惯的一样.

解决方法

看看这里_tmain …等

What is the difference between _tmain() and main() in C++?

stdafx.h是Windows应用程序的预编译头(可选).更多在这里

http://en.wikipedia.org/wiki/Precompiled_header

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐