I believe you wrote the .cpp file on the Linux server, and now you want to get the file from the Linux server to your home computer, and then from your home computer so that you can submit it to your class's website.
To get the file from the Linux server, first find out where the file "lives". So, whilst SSH'd into the Linux server, do this:
$ readlink -f path/to/your/*cpp
/home/rschulj/homework/foo.cpp
The resulting path points to the file.
Now on your home computer, secure copy (scp) the file from the server:
$ scp /home/rschulj/homework/foo.cpp ~/foo.cpp