main()函数-程序入口函数
main()函数-程序入口函数
#include <iostream>
#include <stdio.h>
int main()
{
// 命名空间std
/*
cout or endl就包含在std这个命名空间中
而std就包含在iostream这个头文件中
printf包含在stdio.h这个头文件中中
*/
using namespace std;
//using std::cout;
//using std::endl;
//using std::cin;
//
// cout << "..." << endl;等于
// c语言中的printf("...\n");
cout << "Hello world!" << endl;
printf("hello world\n");
return 0;
}
main函数在一个程序中有且只有一个,它是操作系统调用程序的入口
int main() {} 函数是程序入口
sdef