02-C++、Python极简基础

  • 基础概述
    • 课程介绍
    • Linux系统介绍及安装
    • Linux系统基础操作
    • C++/Python极简基础
    • 安装ROS系统

C++/Python极简基础

安装编译器和解析器

通过命令行形式对代码进行编译

先将编译器作为软件进行安装

在终端输入

1
sudo apt-get install g++

1
sudo apt-get install python

在桌面创建名为c++_for.cpp的文件

![[Pasted image 20250329192837.png]]

编译格式为

1
g++ 编译的代码的文件名 -o 输出的可执行文件的名字

输入

1
g++ c++_for.cpp -o c++_for

c++_for.cpp文件进行编译

![[Pasted image 20250329193328.png]]

按照运行文件的方式

1
./编译完的文件名

输入

1
./c++_for

![[Pasted image 20250329195535.png]]

在桌面创建名为python_for.python的文件

![[Pasted image 20250329194744.png]]

输入

1
python python_for.py

![[Pasted image 20250329195852.png]]

#

Linux #ROS #rm #指令


02-C++、Python极简基础
https://pattianfang.github.io/2025/04/12/02-C++、Python极简基础/
作者
Pat Tian Fang
发布于
2025年4月12日
更新于
2025年5月4日
许可协议