http://bbs.csdn.net/topics/60195477
这是因为使用了C++异常。/EHsc或/GX,两者是等价的。
exception. It is equivalent to /EHsc.
/GX is in effect, by default, when you compile from within the development environment. By default, /GX- is enabled when using command-line tools.
For more information, see C++ Exception Handling.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the C/C++ folder.
Click the Command Line property page.
Type the compiler option in the Additional Options box.
http://blog.sina.com.cn/s/blog_5ce0a2540100jyoc.html
#include <iostream.h >是VC6以前的写法。
#include <iostream >
using
这个是标准库的写法。标准库把这些个文件都放到std这个namespace里面了。
可以到VC\include看看和VC6.0的区别,是iostream而不是iostream.h。
注意 <iostream>和<iostream.h>是两个不同的东西
<iostream>是STL库
<iostream.h>是兼容于c的库
所有STL库都在std::名空间下
std::cout是 <iostream>里面的对象
namespace std: 所有的C++ Standard LibraryClass都包含在这个叫std的name
space里。比如 <vector>,<iostream>,<iterator>等等。所以当你使用它们其中的class时
,需要加入这个语句,using namespace std; 不然编译器报错。