SyntaxFix
Write A Post
Hire A Developer
Questions
You should use g++, not gcc, to compile C++ programs.
g++
gcc
For this particular program, I just typed
make avishay
and let make figure out the rest. Gives your executable a decent name, too, instead of a.out.
make
a.out