1.用什么软件进行编译
Visual Studio 2022是一款比较好的软件
2.代码部分
通用的方法(1)
#include<iostream>
using namespace std;
int main()
{
cout<<"hello world"<<endl;
return 0;
}
endl是换行的意思
如果不想要using namespace std;就必须就要在每一个之前加上std和两个冒号
通用的方法(2)
#include<stdio.h>
int main()
{
printf("hello world\n");
return 0;
}
在结尾的\n是换行的意思
3.注意点
在主函数里的每一句话后面要加分号。