Lesson 1: Getting Start With the IDE For C++
Learn C++ with us
Introduction
C++ is a combination of both high-level and low-level language, making it a middle-level language. It is object-oriented and used as an extension of the C language.
What is an IDE?
IDE is an Integrated Development Environment. You will be using Visual Studio 2019 or the latest version for programming. Visual Studio provides built-in debugging and programs running. As a beginner, you will not face any difficultly in writing codes and will get familiar with the interface quickly. Download Visual Studio from the link below:
Once you have downloaded the Visual Studio and it is all set up. Follow the following setups:
Create new project>>Change the language from All language to C++ from top >>Click on Console App>>Click Next.
Once you click Next, a new window will pop up. You will give a name to the project. Change the location of the project, click create and you are good to go.
Wait for Visual Studio to create the project, it will not take too long.
Once it is opened, it should look like this:
Things you need to remember when writing codes:
#include <iostream>
Your main code starts with #include <iostream>. It is a header file, containing functions for input and output operations. In simple words, It means that the program will include input and output streams in it. Just write the statement as it is.
int main(){ }
The main code is written in the body of int main in pranthesis{}. We write it after #include <iostream> to let the compiler know that the program will return an integer value.
Semi-colon;
Expect the functions, every single statement in the code must end with a semi-colon (;). Otherwise, your program will not run.
return 0;
return 0 is written at the end of the code within the pranthesis{} of int main. Its purpose is to only return the value you get as an output.
Comments
The statements with “//” at the beginning of them are comments and have nothing to do with the code. They are just for a better understanding of you.
That is it for today, I hope you learnt something new today. I will be posting more articles in a sequence but for that, I need your support. Subscribe to my email so you won't miss any article I post.