C++的第一个程序:Hello World
#include<iostream> // 包含"iostream.h"文件,该文件使得设计的程序具有输入输出功能。
using namespace std;
int main(){ // 主函数,每个程序只能有且仅有一个主函数
cout << "Hello World!"; // 程序输出
return 0; //主函数的返回值
}
C++的第一个程序:Hello World
#include<iostream> // 包含"iostream.h"文件,该文件使得设计的程序具有输入输出功能。
using namespace std;
int main(){ // 主函数,每个程序只能有且仅有一个主函数
cout << "Hello World!"; // 程序输出
return 0; //主函数的返回值
}