run cpp code

Solutions on MaxInterview for run cpp code by the best coders in the world

showing results for - "run cpp code"
Lina
30 Aug 2020
1# Open Terminal: 
2
3# Type: 
4g++ --version
5
6# If the command is not recognized: 
7sudo apt-get install g++ 
8g++ --version # should work now 
9
10# If the command is recognized
11mkdir tmp 
12cd tmp 
13touch main.cpp 
14# open main.cpp using vi, vim, gedit, etc
15# Type in a hello world program: 
16# https://www.tutorialspoint.com/cplusplus-hello-world-program
17
18# Once this has been done, type in: 
19g++ main.cpp
20./a.out 
Liah
13 Jun 2018
1Online compiler available it would run cpp program for you online.
similar questions
queries leading to this page
run cpp code