Answers for "run cpp code"

C++
0

how to run cpp file

# Open Terminal: 

# Type: 
g++ --version

# If the command is not recognized: 
sudo apt-get install g++ 
g++ --version # should work now 

# If the command is recognized
mkdir tmp 
cd tmp 
touch main.cpp 
# open main.cpp using vi, vim, gedit, etc
# Type in a hello world program: 
# https://www.tutorialspoint.com/cplusplus-hello-world-program

# Once this has been done, type in: 
g++ main.cpp
./a.out
Posted by: Guest on August-31-2021
0

run cpp code

Online compiler available it would run cpp program for you online.
Posted by: Guest on September-17-2021

Browse Popular Code Answers by Language