C++的命名空间

来源:互联网 发布:盘锦网络维护培训学校 编辑:程序博客网 时间:2024/05/16 18:06
#include <iostream>//命名空间的using namespace std; //iostream 有一个命名空间 叫std }//  如果想使用cout endl 等等这些标准输出 一定要引入 std命名空间// using namespace  std;int main(void){int a = 0;cout << "hello world" <<endl; //cout 就是一个标准的输出, 就是黑屏幕  //endl 他在C++中就是\ncout << "请输出一个数字" << endl;cin >> a;cout << "a = " << a << endl;return 0;}

0 0