首先新建终端,输入vi cprogram.cpp,建立一个C++文件

基于Linux编写C++程序

 

按I,开始输入程序,输入结束之后输入:wq保存退出

基于Linux编写C++程序

输入g++ cprogram.cpp –o cpro编译程序

基于Linux编写C++程序

编译通过:

基于Linux编写C++程序

然后输入./pro运行程序

基于Linux编写C++程序

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2022-01-07
  • 2021-08-26
  • 2021-07-04
  • 2021-10-07
  • 2022-12-23
猜你喜欢
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2021-05-13
  • 2021-12-09
  • 2023-03-19
相关资源
相似解决方案