Compiling C and C++ programs
- Use an editor such as nedit, vim, or emacs:
"nedit &" leaves the terminal window active
- C programs: gcc filename.c -o filename
(or gcc -o filename filename.c)
- C++ programs: g++ filename.cpp -o filename
(or g++ -o filename filename.cpp)
- Running C and C++ programs: ./filename
(This is how to run executable files)