在 C++ 源代码中,using namespace std; 有什么作用?
using namespace std;
C++ 标识符将不再区分大小写。
可以删除所有 include 指令。
可以直接使用 cout 和 endl 等标准库名称,而不必加 std:: 前缀。
cout
endl
std::
会将 main 函数重命名为 std。