您的位置:首页 > 其它

c ++ helloworld

2018-02-09 13:35 197 查看
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world" << endl;
return 0;
}


#include <iostream>
和c中不同,不再需要.h

using namespace std
因为下面用到了
cout
endl
,二者都是标准命名空间(namspace std)的变量,所以要声明

endl
代表换行,在win系统下,会被编译为\r\n,在linux系统下会被编译为\n

1)当使用
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: