In these C++ tutorials, we are going to learn the C++ programming language. First of all, I am going to explain how these C++ tutorials will differ from other sources of learning C++:
Here is the content outline which we are going to cover in today's C++ tutorial:
Before starting this C++ tutorial, we should know the reason behind learning a programming language? Let me answer this fundamental question for you. A programming language helps a user to communicate with the computer properly. For example, if a person wants to talk to another person, he must learn a language (like English, Hindi, Bangla, etc.), which another person can understand. If a human wants to talk to the computer or give some instructions, he has to learn a language that computers can understand. There are many languages that computers can understand, like python, java, and C++.
As we are going to learn C++ in this set of tutorials - here arises another essential question: why learn C++ despite it being an ancient programming language? Bjarne Stroustrup developed C++ as an addition to the C language. The main reason to use C++ is that it is very close to the hardware, which means that it is beneficial for the programmer to give direct instructions to a device without using any intermediate medium. Another reason to use C++ is that it is an object-oriented programming language, and object-oriented languages can create complex real-world software systems. Well, we will dive very deep into OOPs and inheritance later in this course!
Visual studio is a source code editor - free to use, provided & maintained by Microsoft. Below is the process of downloading and installing visual studio code:
Step 1: Click here and you will be redirected to the official download page of VS Code. Download the VS code according to your operating system in use. I will be downloading it for Windows 10 as shown in the below animation.
Figure 1: Visual Studio Code Website
Step 2: Once the downloading is complete, install VS code on your system like any other application.
g++ is a compiler that helps us convert our source code into a .exe file. Below is the process of downloading and installing g++:
Step 1: Go to Google and search "MinGW install" and click on the MinGW link, as shown in the image below.
Figure 4: g++ installation from Google
Step 2: Click on the download button on the top right corner menu.
Figure 5: G++ Download Step
Step 3: After visiting the download page, click on the windows button as shown in the image below to start the downloading
Figure 6 G++ Download Step
Step 4: After the download - open the program and click "Continue" to start the installation process.
Figure 7: G++ Installation Step
Step 5: After downloading some packages, it will show you a screen, as shown in the image below. You have to mark both the boxes as in the image below, and then click on installation on the top left corner menu. Finally, click apply changes, and it will start downloading the required packages.
Figure 8: G++ Installation Step
Step 6: After finishing step 5, close the program and open C:// drive. Furthermore, locate the MinGW folder. Go to its bin directory and copy its file path, as shown in the image below.
Figure 9: Copying g++ file path
Step 7: Now right-click on this pc and go to properties
Step 8: After that click on advanced system settings as shown in the image below
Figure 10: Step to Add g++ File Path
Step 9: After that click on "Environment Variables" as shown in the image below
Figure 11: Step to Add G++ File Path
Step 10: After that select path and click on edit as shown in the image below
Figure 12: Step to Add g++ file path
Step 11: Then, click on new and paste the file path and click ok as shown in the image below