方法1:
#include <iostream>
//命名空间
using namespace std;
void main()
{
cout<<"hello world !"<<endl;
}
方法2:
#include <iostream>
void main()
{
std::cout<<"hello world !"<<std::endl;
}
方法3:
#include <iostream>
using std::cout;
using std::endl;
void main()
{
cout<<"hello world !"<<endl;
}
执行结果:
本文介绍了C++编程的基础知识,包括命名空间、输入输出流使用及实例代码演示。

被折叠的 条评论
为什么被折叠?



