这里发生了一些非常奇怪的事情。我做了一段非常简单的代码来包含一个if流,我得到了一个致命的错误:编译时找不到'ifstream‘文件。我怀疑这和编译器有关。
#include <ifstream>
using namespace std;
int main(){
cout <<"hello world" <<endl;
}上面的代码是使用命令clang++ *.cpp -o "test“用clang编译的。
发布于 2013-04-16 06:11:32
标头名称错误,没有ifstream标头。如果你想使用cout,你可能想要包含iostream
#include <iostream> https://stackoverflow.com/questions/16025523
复制相似问题