Pictures

I googled and found the solution

Solution

but I'm nub sooo, what is compiler flag? how to set it up? there multiple choice, so where should I start? Or should I just switch to IDE(Code::Blocks), the C++ Primer recommend me to use command-line interface compiler and compile it 'manually'. compile this kind of ways really cause a lot of mess...

but I'm nub sooo, what is compiler flag?

It's an option added to the command line invokation of the compiler. Right now you're probably only using something like this:

$ g++ myprogram.cpp

But you can add a huge number of options in the form of flags. For example, to only compile the code and not link it into an executable you'd use the -c option:

$ g++ -c myprogram.cpp

And then to link it into an executable separately from the result of the previous invokation, this:

$ g++ myprogram.o

Compiler options will take the form of either -<option> or --<option>, and you can find a complete list of them here.

so, it seems that I need to use the line everytime compiling certain code.

what about the changing PATH enviroment variable?

what about the changing PATH enviroment variable?

What about it?