g++ (GCC's C++ front end) and Clang are both free, cross-platform, and available on Linux, macOS, and Windows; MSVC is Microsoft's own compiler, tightly integrated with Visual Studio and the primary choice on Windows. Each independently implements the ISO C++ standard, tracking their own compliance status pages, which means a specific new language feature can be available in one compiler well before another — checking a project's actual target compiler and version matters more in C++ than in languages with a single reference implementation.
Compiling and running by hand
The -std flag targets a specific standard version explicitly — without it, the compiler's default can vary by version, making builds less predictable across different machines and compiler updates.
$ g++ -std=c++23 -Wall -Wextra -o hello hello.cpp
$ ./hello
Hello, World!
$ clang++ -std=c++23 -o hello hello.cpp // Clang works identically for this same sourceEnabling warnings: genuinely essential in C++
-Wall -Wextra catches a meaningful class of real bugs before they ever run — an uninitialized member, a shadowed variable, a suspicious implicit conversion — all things C++'s permissive defaults would otherwise let compile silently.
$ g++ -std=c++23 -Wall -Wextra -Wpedantic -o app app.cpp
// -Wpedantic: warns about non-standard compiler extensions being usedPackage management: no single official answer
Unlike languages with one dominant built-in package manager, C++ has several competing third-party solutions — vcpkg (Microsoft-backed) and Conan are the two most widely used today, each managing external library dependencies in a way C++ itself has no built-in mechanism for.
$ vcpkg install fmt // one common option
$ conan install fmt/10.2.1 // another common option, different project