Even though you stated your reason for not wanting Visual Studio - it's still the industry standard.
VSCode is slimmed down, open source (well, the source is open under MIT license, but the MS branded executables you get from Microsoft are not, see
VSCodium for actually MIT-licensed version if you're bothered with that) and multiplatform, I would at the very least keep in mind that there is such a thing, and it's a really good editor/IDE-light. I stress, really good. Also PlatformIO runs on it, if you're planning to get into microcontroller programming in the future.
There's Eclipse (CDT) and NetBeans which are available for free, support many languages (Java foremost) and are not bad at all - though being run on Java they (especially Eclipse, in my experience) tend to sag a bit. Might not be an issue for you if you're running a modern PC with an SDD, though, and it wasn't that bad even with HDD, but with bigger projects SDD does alleviate some issues with an occasional lag.
If you're just starting you probably won't be running big projects anytime soon. Projects that are one file, or just a couple of files big are perfectly manageable using just a fancy editor like Notepad++, Flo's Notepad2 (I use it as a general replacement for MS Notepad, basically replace notepad.exe with it. It's much snappier than many other programmer's editors mentioned here), Atom, Brackets, Sublime (to name a few newer tech editors), heck, use (G)Vim or Emacs if you're familiar with those, they'll do the job perfectly fine and give you that nineties vibe of linux devs as a bonus.
All you need to do is install GCC/MinGW separately, make sure it works in the terminal. You can then just use the terminal to compile your stuff or use solutions built into the editors to do it for you, if they exist.
Make sure to learn how to use '
make'. It'll come in handy.
Not a fan of Code::Blocks, but it does indeed come bundled with GCC/MinGW (how old of a version though, I don't know) and it is an IDE, not just an editor, so it's also an option.
I'd stay away from Dev C++ IDE, even though it has been quite popular due to some youtube tutorials (and even some books, regrettably... though not all of them bad at all!) being based around it.
Advice:
Either in the terminal when compiling by hand, makefile, or project options/compiler options in your editor/IDE, be sure to add something akin to this in your compilation line:
-pedantic -Wall -Wextra -std=XXXXwhere XXXX is a standard revision, like so:
-std=c++20. Forcing compliance with other (older) versions of the standard is possible as well. More info in the
GCC manual.
This will enable a lot of useful warnings and disable some GCC specific extensions that you probably have no interest in using at the moment anyway (as they aren't strictly a part of the language). Those errors and warnings will keep you safe(r) and will help to guide your way. Use them to your benefit. Disable them at your own peril.
Maybe add
-Wfatal-errors in there to stop compilation after the first error so that you don't have to wade through many lines of error messages which very well might disappear after the cause of the first error is taken care of. (Always start solving problems with the first error reported.)
Opinion:
I agree to an extent that it's good to start with barebones setup and then go on to see what goodies more advanced editors/IDEs bring, but I would say an editor WITH syntax highlighting is the minimum. There's really no need to torture yourself without this very useful feature. I mean maybe for an hour or so to see what people in the middle ages had to go through, but let's be civilized over here.