c++ primer上的一段程序为何无法通过编译?
程序代码:
#include <string> #include <iostream> using std::cin; using std::cout; using std::endl; using std::string; int main() { string word; // read until end-of-file, writing each word to a new line while (cin >> word) cout << word << endl; return 0; }上面这段程序是C++ Primer上的,为何出现无法编译的错误啊?