正在加载图片...
C++语言程序设计 C+程序奥例一例2-1 2 1. cpp c+程序结构由注释、编译预处理和程序主体组成* #include <iostream> 语 using namespace std; 言 int main0 /maino函数是C+程序入口点 概 cout<<" Hello!Ⅶm";∥out是预定义的流类对象 述cout<" Welcome to c+十!Ⅶn";∥<是流操作符 return Ug }/括号把函数体与其它部分分隔开 运行结果: x Hello! Welcome to c++!C++语言程序设计 6 C++程序实例—例2-1 /*2_1.cpp c++程序结构由注释、编译预处理和程序主体组成*/ #include <iostream> using namespace std; int main() //main()函数是C++程序入口点 { cout<<"Hello!\n"; //cout是预定义的流类对象 cout<<"Welcome to c++!\n"; // <<是流操作符 return 0; } //大括号把函数体与其它部分分隔开 运行结果: Hello! Welcome to c++! C++ 语 言 概 述
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有