In reply to Removed User:
For my sins, I work as a c++ programmer so can offer you my 10cents:
I think there Is some confusion here - when you ask for a good compiler I think what you are actually referring to is a good IDE you can use. Compilers are usually platform-specific of which you have GCC (linux), Clang(Mac) and MSVC/mingw (Windows) which take the source code and compile down to machine code.
Example of IDE's include Visual Studio (Windows), Xcode(Mac) and VS Code (cross-platform). If your students are working on various platforms then VS Code is a good one but is more bare-boned due to it being cross-platform thus you will need to set up the compiler depending on the platform you are using. Though this is a lot of good on-line info for setting this up. VS Studio for windows and Xcode for Mac are easier in my opinion as these require the least amount of setting up but are platform specific.
The IDE then saves you the headache of doing things via the terminal, as it calls the compiler for you with the necessary arguments.
Post edited at 16:00