Thursday, August 1, 2013

How to Run C++ Program in Linux Terminal


How to Run C++ Program in Linux Terminal

How to Run C++ Program in Linux Terminal

C : "gcc -o outputfilename programmename.c" will compile prognamename.c and
the object file created will be called filename. It can be run by typing "./filename".
If no “ -o outputfilename “ is not given then the default output file is a.out and can
be run by ./a.out

C++ : Same as for C, replacing gcc with g++.


How to Run C++ Program in Linux Terminal


No comments:

Post a Comment

Linux Tips and tricks,Online Linux Helpers