记得最初学C++ 用的是Visual Studio 6.0, 在那个大机房里,老师在讲台上吆喝着说“大家选择win32 console project”,当时也没管多少。
现在转眼间到VS2013了,本文记一下创建C++ Project的小不同。
用Console,里面自带"stdafx.h" is some header file with important stuff in it pertaining to Visual Studio only.
main函数成了
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
("_tmain( )" is an extension of Microsoft's C++ compiler and therefore, is non-standard.)
return int 0是跟linux 下c的规范一样的,说明了这是console application。我试了个例子:#include "stdafx.h"
#include "iostream"
using na

这篇博客回顾了从Visual Studio 6.0到VS2013中创建C++项目的变化,重点介绍了在VS2013中创建Console Project时遇到的不同,如自带的"stdafx.h"头文件和非标准的"_tmain()"函数。同时提到了Windows Project的复杂性以及MFC的淘汰趋势,建议一般情况下选择创建Empty Project。
最低0.47元/天 解锁文章
1366

被折叠的 条评论
为什么被折叠?



