有时会碰到奇怪的编译错误
fatal error C1001: INTERNAL COMPILER ERROR(compiler file 'msc1.cpp', line 1786)
致命错误C1001:内部编译器错误(编译器的文件'msc1.cpp “ ,线路1786 )
解决方法是
用#include <iostream.h> 替换 #include <iostream> using namespace std; 就能编译通过了
具体原因不知道
1.#include<iostream.h>是C语言中比较通用的
2.#include<iostream>
using namespace std;
是C++中比较通用的
#include <iostream.h>这样写,里面的函数都是全局函数.
更本质上的区别就是iostream把标准C++库的组件放在一个名位std的namespace里面。而相对的iostream.h则将这些标准组件放在全局空间里,同时在标准化以后旧有的C标准库也已经经过改造了。 使用前者,就需要在代码中添加语句:using namespace std;
本文介绍了一种解决C++编译过程中出现的内部错误C1001的方法,通过将#include <iostream> 和 using namespace std; 替换为 #include <iostream.h>,成功规避了特定的编译器错误。

8949

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



