How to compile C++ under Ubuntu Linux?

前端 未结 11 1909
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 08:35

I cut&pasted the below code from a previous question into a file called \"avishay.cpp\" and then ran

gcc avishay.cpp

only to get the f

11条回答
  •  悲哀的现实
    2020-12-09 09:08

    Update your apt-get:

    $ sudo apt-get update
    $ sudo apt-get install g++
    

    Run your program.cpp:

    $ g++ program.cpp
    $ ./a.out
    

提交回复
热议问题