If you installed Code::Blocks 2003 with MinGW included the compiler flag for C++17 is properly listed in the projects build options as [-std=c++17] instead of [-std=c++1z].
I didn't change any configurations, I did a default install (other than selecting a different install location).
The selected compiler should be "GNU GCC compiler."
You've found one part of Learn C++ that isn't as up-to-date as possible.
FYI, the MinGW version bundled with C::B 2003 is not the most recent, so C++20/2a support is not part of the bundle.
If unsure, please use codeblocks-20.03mingw-setup.exe!
IF you download C::B and have a previous install I suggest you uninstall the previous install first. As well as removing any left-over files and directories. That makes sure all the proper default settings are set properly when installing the latest C::B version.
I finally got right one, I uninstall everything from my computer relate to Code::Block, even the register. Reinstall but used different source this time. This time the have g++ follow the C++17 ISO C++ language standard [-std=c++17] is there in the list.
two day of fighting with error, Finally got it to working. Thank you all for the help.
I am glad you got things to work, sometimes the tools we use can be cranky. It doesn't help someone new to programming.
I personally wouldn't have bothered with mucking around with the registry, it can be all too easy to mess up the editing and turn a functioning computer into a large unbootable door stop.
It looks like you have a Windows PC. If you have the space you might consider also installing Visual Studio. There is a Community edition that is free. Fair warning, VS does take a lot of HD space to install. On my development PC about 20GBs.
Having different compilers can help creating "agnostic" as possible C++ code. I use both C::B and VS to test drive my code from time to time. Sometimes what works with one IDE/compiler errors out with another. Some tweaks and now the code works for both.
IF you do install VS you need to do a custom install. The C++ packages are not installed by default.
There are some packages that VS default installs that you might not want cluttering up your HD. F# is one IIRC. Doing a custom install gets what you want.