Compile and run C++ programming on your OS

C++ is completely free and readily available on all platforms.
Follow the tutorial below for running C++ on your computer.
There are multiple compilers and text editors you can use to run C++ programming. These may differ from system to system.
If you want a quick start, you can also run C++ program online.
Follow the tutorial below for running C++ on your computer.
There are multiple compilers and text editors you can use to run C++ programming. These may differ from system to system.
If you want a quick start, you can also run C++ program online.

Run C++ in Windows (XP, 7, 8 and 10)
To run C++ Programming in Windows, you’d need to download Code::Blocks.
There are others available as well but Code::Blocks makes installation a piece of cake.
It’s easy, simple and developer friendly.
To make this procedure even easier, follow this step by step guide.
Alternatively, you can download and use c++ compiler from the link shown below and follow the same procedures
Download
There are others available as well but Code::Blocks makes installation a piece of cake.
It’s easy, simple and developer friendly.
To make this procedure even easier, follow this step by step guide.
- Go to the binary release download page of Code:Blocks official site.
- Under Windows XP / Vista / 7 / 8.x / 10 section, click the link with mingw-setup highlighted row either from Sourceforge.net or FossHub.
- Open the Code::Blocks Setup file and follow the instructions (Next > I agree > Next > Install); you don’t need to change anything. This installs the Code::Blocks with gnu gcc compiler, which is the best compiler to start with for beginners.
- Now, open Code::Blocks and go to File > New > Empty file (Shortcut: Ctrl+Shift+N)
- Write the C++ code and save the file with .cpp extension. To save the file, go to File > Save (Shortcut: Ctrl+S). Important: The filename should end with .cpp extension, like: hello.cpp, your-program-name.cpp
- To run the program, go to Build > Build and Run (Shortcut: F9). This will build the executable file and run it.
Alternatively, you can download and use c++ compiler from the link shown below and follow the same procedures
Download
Your first C++ program

Now you have installed the compiler based on your OS, it’s time to write your first C++ program.
“Hello World!”
Your first C++ program will be a “Hello World!” program.You might have noticed “Hello World!” being the first program while starting out with any programming language. This is because:

- It is a standard check to see whether everything is working fine or not.
- There will be very less code to start with.
- The less code makes it intuitive for the beginners to get acquainted with the language.
- The code is enough to learn the basic syntax and semantics of the language.
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!";
return 0;
}

The program prints
Hello World!
in the output screen.
thanks a lot for this post, it really helped in solving my problem
ReplyDeleteplease admin how can i make use of C++ to write program requesting for passcode? i really need your assistance.
ReplyDeletethanks from Emma