asy*_*ait 31 c++ cygwin compiler-errors visual-c++
请不要与标题混淆,因为它已被某人询问,但不同的背景
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 ++中编译得很好.有什么想法吗?
sbi*_*sbi 90
你是否包括以下所有标题?
<fstream><istream><iostream><string>我的猜测是你忘记了<string>.
旁注:那应该是std::cout和std::endl.
| 归档时间: |
|
| 查看次数: |
76563 次 |
| 最近记录: |