首先vscode是一个比较方便的东西,我们可以很方便的去使用并编写程序。

c++的相关的代码:

#include <iostream>
// if you writer a c++ program you must first have down :
//return type  //function name  //parameter list  //function body
int main() //main function    int is back type
{
    std::cout << "hello world\n";
    return -1; //return type
}

result:

[Running] cd "/Users/Desktop/" && g++ 1.cpp -o 1 && "/Users/Desktop/"1
hello world

[Done] exited with code=255 in 0.447 seconds
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐