2. Introduction to C++; Absolute beginner skill level; Breaking down Hello World; Fundamentals

Опубликовано: 30 Июль 2026
на канале: DigitalStage
14,959
182

   • 2. Introduction to C++; Absolute beginner ...  

This is part 2 of the programming in c++ series for you. In this video we will break down the basic hello world program that we wrote earlier into different parts and see what every part is doing. This should be straight forward. I just want you to see what everything is doing and how are all those parts important. So, if you are having difficulty understanding just go with it for a moment and you should be able to understand it as we go on with the programming.

Here's what we did:

We have a hello world program and below is written breakdown of the program:

Anything that starts in c++ with a hash(#) is called a preprocessor directive. Those are the commands that are processed first even before the actual program is compiled by the c++ compiler. In our case we have asked to include a file called iostream. iostream is a standard library file for c++ that will define the commands to have standard input and output for the program.
Anything that you use after include is called the header file and it is enclosed in smaller than and greater than sign if it is standard library file. Or if you are including a file that you wrote and is not standard library file you can include them within a " ". For example include "myfile".

The commends begin with // or have /* and end with */ and do have any effect on the program whatsoever. Its for you and other programmers to read your program.

A c++ program will always have a main function that returns an integer. So it is defined as int main(){}. All the functions are defined in that manner. Anything between { and } is called the body. Between ( and ) you will have different variables and we will talk about those later on.

cout is a standard output command for c++. With cout you can put your output to standard output which is mostly your computer screen. endl is written in the end to say that the line ends here. Whatever you do or write, write in next line.

That line defines an statement. And statements always end with a semicolon.

And very very important: c++ is a case sensitive language!!!! Smaller letters and capital letters have differences.

Thank you for watching video. Will see you in the next video.
Please rate comment and subscribe.