Today, I downloaded the source code with a cpp suffix and compiled and run it on the local machine. The problem may occur and then solved it in sequence. The following is an example:
I don't know how long I installed g ++ on Fedora 18. if you don't have it, run the command: yum install gcc-c ++.
After the compiler is solved, we may find errors during compilation. If you write the header file of iostream. h, the compilation will fail,
There is no iostream. h header file in/usr/include/c ++/4.7.2. Change it to iostream. Add using namespace before the main function
Std; one row; old files with. h suffixes, C ++ standard before birth (98 years. The C ++ standard header file does not have the. h suffix, and the standard library functions
All are placed in the std namespace. Don't follow the book to write. h. The teaching materials have been behind for more than 10 years!
Well, what I said later is what a Senior said. I was so excited that I learned something more than a decade ago, and I am ashamed to learn it.