Possible Duplicate:
No such file iostream.h when including
即使在使用 .cpp 扩展名命名源文件之后。我的编译器在命令提示符和代码块中都给出了这个错误。我该如何解决这个问题?
#include <iostream.h>
int main(){
cout<<"Hello World!\n";
return 0;
}
最佳答案
标准 C++ 中不存在该 header 。它是 1990 年代之前的一些编译器的一部分,但肯定不是 C++ 的一部分。
使用 #include <iostream>
反而。所有的库类都在std::
命名空间,例如 std::cout
.
另外,扔掉任何提到你所说的事情的书或笔记。
关于c++ - fatal error : iostream. h 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13049978/