请不要与标题混淆,因为它已被某人询问,但不同的背景
Visual C++编译器(VS2008)中的以下代码未编译,而是抛出此异常:
std::ifstream input (fileName);
while (input) {
string s;
input >> s;
std::cout << s << std::endl;
};
Run Code Online (Sandbox Code Playgroud)
但是这个代码在cygwin g ++中编译得很好.有什么想法吗?