ubuntu下編譯c++和Python文件

C++

1.首先在終端創建一個C++文件

touch helloworld.cpp

2.把你的程序寫進文件中

gedit helloworld.cpp

3.保存退出
Ctrl+s
4.編譯成可執行文件

g++ helloworld.cpp -o helloworld

5.執行

./helloworld

Python

相同的,創建一個python文件

touch helloworld.py

2.把你的程序寫進文件中

gedit helloworld.cpp

3.保存退出
Ctrl+s
4.編譯執行

python helloworld.py
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章