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

了解Visual C控制台项目中的_tmain,第1张

概述在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;} 我有几个 在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

总结

以上是内存溢出为你收集整理的了解Visual C控制台项目中的_tmain全部内容,希望文章能够帮你解决了解Visual C控制台项目中的_tmain所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/langs/1233271.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-06
下一篇 2022-06-06

发表评论

登录后才能评论

评论列表(0条)

保存