编译出错: $ g++ s.cpp -o s.out s.cpp: In function `int main(int, char**)": s.cpp:12: error: `cout" was not declared in this scope s.cpp:12: error: `endl" was not declared in this scope
原因: C++ 1998 要求cout and endl被调用使用"std::cout"和"std::endl"格式,或using namespace std;