It looks like you're trying to execute the source file, i.e. run it as a shell script.
To compile your program you would do something like this:
$ g++ -Wall FP.cpp -o FP
This produces an executable named FP
. So you should now see both the original program, FP.cpp
, and the executable, FP
, in your current directory.
To run the executable (compiled program):
$ ./FP