写一个cpp 在uos系统上

#include <iostream>

int main() {
    std::cout << "Hello, UOS!" << std::endl;
    return 0;
}

创建一个test.cpp文件,

在当前目录打开终端,

把上面代码内容写里面,

输入g++ test.cpp,

生成了一个a.out文件,

./a.out

输出

Hello, UOS!

 

posted @ 2024-08-10 05:28  Rkey  阅读(1)  评论(0编辑  收藏  举报