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
Use g++. And make sure you have the relevant libraries installed.
Install gcc and try the video below.
Try this:
https://www.youtube.com/watch?v=A6v2Ceqy4Tk
Hope it will works for you.
you can use g++ --std=c++0x example.cpp -o example
You probably should use g++ rather than gcc.
g++ is the C++ compiler under linux. The code looks right. It is possible that you are missing a library reference which is used as such:
g++ -l{library name here (math fns use "m")} codefile.cpp
Use
g++
space followed by the program name. e.g:
g++ prog.cpp
if the filename was "prog.cpp" in this case. if you want to run the program write:
./prog
so i used
"prog"
because it was my filename.