Originally posted by natm
first of all, I might be using the wrong command so it could yougive me the right command for compiling c++ programs?
I just type
but now that I think about it, I don't know how to specify where the compiled executable should go.
You need to familiarise yourself with manual pages. Type:
and you'll get the whole manual page for GCC (the gnu compiler collection). Most linux programs have a manual page and you access them in exactly the same way. It's q to quit, btw.
Right o, the command for compiling c++ is g++ not gcc. gcc will compile plain old vanilla C, not C++. So you want:
g++ <filename> -o executablename
If you don't specify the executable name you'll get an executable called a.out