CodeBlocks, cstdio, mingw and to_string are a notorious combination that you might spend hours and hours on to resolve.
The quickest and most reliable way to resolve this well known and long-standing issue, if you can, is to junk CodeBlocks and use Visual Studio, XCode or something similar.
CodeBlocks is rubbish. If you look at the revision list for it CodeBlocks is virtually unsupported.
I'm not saying it wouldn't be slooooooooooower than molasses, but you appear to meet the minimum requirements.
Code::Blocks would be a better fit for your antique CPU. Even 20.03 will work since there are 32-bit downloads available. The compiler "under the hood" is not a major determining factor. http://forums.codeblocks.org/index.php?topic=16779.0
There are no longer any official 32-bit downloads for 17.12 or earlier. Only for 20.03.
MinGW is a decent for-Windows GNU compiler. Getting the MinGW C::B setup would save you a lot of steps of having to get a compiler integrated into the IDE.
MinGW | Minimalist GNU for Windows - http://mingw.org/