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++.
No comments:
Post a Comment