I have posted the Compiler paths. It is clearly MinGW Compiler tool set. I have selected GCC Compiler.
Edit: It worked. I closed and opened code::blocks and it worked and Compiled without problem. I don't know what was the problem. I didn't change anything.
You did change something. Please note that there are two places you have compiler settings:
case 1, Menu->Settings->Compiler settings. This is called "Global compiler settings", you have settings for
every compilers, because there is a drop list "selected compiler" to let you select which compiler you are going to set.
case 2, Menu->Project->Build options, this will let you to select compiler to build your project and build targets.
I guess that in the "case 2", you have select "MS Visual C++" compiler for your "SayHi" project, apparently and luckily, your "greet" project use the GCC compiler.I have another question. Where should I ask C++ code related question?
Use Google first, there are many answers but C::B forum is not involved.