I cut&pasted the below code from a previous question into a file called \"avishay.cpp\" and then ran
gcc avishay.cpp
only to get the f
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