设为首页 加入收藏

TOP

用C++写一个hello world
2018-03-18 16:21:09 】 浏览:164
Tags:一个 hello world

下面是一个最简单的C++程序,要交作业的小朋友可以复制粘贴后离开了。

#include 
  
   
int main()
{
    using namespace std;
    cout << "HelloWorld\n";
    //cout << endl;
    cout << "2333";
    return 0;
}

  

下面我记叙一下代码的意思:

#include 
  
            //类似于头文件来理解
int main()                  //主函数
{
    using namespace std;    //记得写就行
    cout << "HelloWorld\n"; //打印“helloworld"
    //cout << endl;         //这句是单独打一个回车的意思,因为题目不要求,我们就不打了
    return 0;
}

  
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇C++实践:正则表达式解析声卡参数 下一篇C/C++混合编程代码实例

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目