g++ is the compiler for c++, gcc is for c, and I don't think cc is a compiler at all.
if you code something in c++, to run it do something like this:
./g++ -o [executable] [source]
so it would look like:
./g++ -o foo foo.cpp
-o specifies the name out of the ouput file (if you don't use it, your output file is, be default, named "a.out").
as mentioned before, -c just compiles it and doesn't link it (good for quick debugging purposes).
hope this helps