PS:因为本人已经有C语言基础,仅需进一步学习C++,故对如何创建新项目等基础问题不做记录,如有需要请自行搜索,步骤较简单。平台为Visual Studio 2022。
1.C++的基本结构(写C++第一步就是写这个基本结构)
#include <iostream>
using namespace std;
int main()
{
system("pause");
return 0;
}
2.Hello World
#include <iostream>
using namespace std;
int main()
{
cout<<"hello world"<<endl;
system("pause");
return 0;
}
其中hello world字符可以任意更换。