一个完整的c++源程序是()

来源:百度知道 编辑:UC知道 时间:2024/06/21 02:19:05
天空
今天考c++的时候遇到的一道填空题。当时没答出来。

源程序:是说没经过编译的源代码吧
一般包括:头文件(.h),源文件(.cpp),资源文件等

不会填

#include<iostream>
using namespace std;

int main(int argc, char *argv[])
{
cout << "hello world"<<endl;
return 0;
}

1.头文件:#include<……>
2.名次空间 using namespace std;
3.函数声明
4.主函数
5.函数定义

有点搞笑

Kawaii

int main(){return 0;}