To learn C++ programming, you must have a C++ compiler installed in your system. Nowadays, both C and C++ compilers come as a single integrated package, which serves the purpose of C and C++ both program development. This tutorial guides you on how to install the C++ compiler on various operating systems.
What is a Compiler in C++?
A compiler is a computer program that transforms humanly readable (programming language) source code into another computer language (binary) code. In simple terms, the Compiler takes the code you wrote and turns it into binary code that the computer can understand.
This tutorial is for Windows, Unix/Linux, and MAC users. All code has been tested and works correctly on all three operating systems.
List of Available C++ Compilers for Different OS
- Borland C++
- Microsoft Visual C++
- Turbo C++
- g++ is a C++ compiler that comes with most *nix distributions.
For Mac OS:
- Apple XCode
- C++ Code::Block
C++ Compiler Installation on Windows
To use the C++ compiler in Windows, you can install any software mentioned below:
C++ Compiler Installation on UNIX/Linux
If you are using UNIX/Linux, you will probably have a C++ compiler called GCC already in your system. You can type
gcc at the command prompt to check if it is installed.
$ gcc -v
If for some reason, it is not installed on your system, you can download it from gcc.gnu.org/install.
C++ Compiler Installation on MAC
You can install the Xcode development environment from Apple's website to use the GNU C/C++ compiler. You can download Xcode from developer.apple.com/technologies/tools.