Now, let's talk about the main function.
So we have a function in C++ guide main function where the program execution starts.
So always C++ program execution starts from main function, which means that walked all things we want
to make our computer do.
We should be defining that in, say, this main function.
So I'm writing the main function and the syntax for writing.
The main function is Int Main Bracket Open Close then opened up emphasis on the curly brackets.
No logical things to write inside these curly basis that all things will be executed by the CBB component.
So you will be wearing what is compiler so that in a small definition I can give you compiler is the
way that I block programming code is converted into computers.
Native language.
So computer is not a human being, it's it electronic device altered things.
The computer what to understand should be in a format which it is meant to understand.
Like if I only know English language and if somebody is talking to me in Spanish, I won't be understanding
anything.
Similarly, computer only knows one language for machine language.
It won't understand anything apart from that.
So in order to make computer understand, we will be using machine language because it's the native
language of the computer.
So this language is called High-Level Language.
All the programming languages like C, C++, Java, everything is called High-Level Language.
These are the language which we understand so that we can write programs or instructions, which can
be said like used for creating tasks for which which are meant to be executed by the computer.
But in the case of like high level languages, when we give the high level language to statically to
computer, it won't understand it.
So in order to make the high level language languages more understandable for a computer, we will do
a process called competition, and computation is done by a software like compiler.
So these, like we may be using it, kind of commands to create that compilation process.
So that's about competition.
What are all things we write in the C++ language?
We need to convert it in a language that computers understand.
So that process is done by a software called compiler.
And that process is card combination.
So I will be using this term again and again, and we will be seeing competition throughout the program.
So once the compilation is starting and we start to run the program, all the things written inside
these curly braces or the main function will be executed by the computer.
So let's write out a statement.
See.
Hello.
What?
And we put a semicolon at the end of that statement.
This is because all the C++ programming statements, except some statements will be ending with semicolons.
So these are the statements in C++, and these statements will always end with a semicolon.
So code is that command order function, which will be helping the users to print the values which is
given in their code statement.
So the syntax for using CODIS you have to use this year keyword, then you have to use this two symbols,
which is the greater than grade and then symbols two are pointing towards the Hello world.
So which means we will be printing this statement.
So this is going to this streaming session operator, which will put the data to that standard output
device, which is the monitor, so that all things you like would see our cover and then putting the
stream insertion keyword or symbol that will be put to that monitor or standard output device in that
system.
So this is that in output statement for printing, hello.
Then we will be writing return.
Zero.
So why are you liberating the 10 zero, it's like we have used main function with indigenous prototyping.
So that's why we are using returns zero.
So you will be wondering why this prototyping, why it is written statement everything so that we will
cover in the module card functions.
For now, we'll be writing our first and basic C++ programming program, and you need not to worry about
all these statements meaning it or.
So just see, this is the basic structure of C++ program.
So now we can start running and executing the program.
So first of all, like I have said, this program is in a language which we understand because it's
in the language that seems like computers should Anderson, but it's only a language, which is meant
more easier for us to understand.
So what we need to do is like, we need to convert this language, this program in their statements,
which computer can understand or that machine language.
So we need to compile this program.
So what we do to compile this program is, first of all, I think you are familiar with some of the
next comments.
My location of this particular program is desktop.
So inside my terminal, I will be navigating through desktop then.
Now I need to compile this file so that it will be.
These instructions can be converted into machine instructions.
So I will be comparing this program by writing a code like Commands by G Plus Plus, which is a combination
command which we will use inside Linux or Mac OS.
So Windows, it's kind of different so you can refer to the manual for Windows for compiling the program.
It's available with that here.
C C++ compiler tutorials are available on the Visual Studio board, so D-plus presses the command.
Then I have to write the file name.
Hello, Lloyd Doggett CB.
So what happens when I press enter in this particular command is the D-plus Plus.
Is that on Belarus to the system, it will compile my file Hello World C++ into a meaningful program.
So let's hit.
And so you don't see any kind of commands or get any kind of warning sign at us or here you can just
see a blank next line coming in.
That means your program is compiled successfully.
You don't have any of it.
So let's see what happens if my program have some kind of state also began seeing this do about it.
So I'm replacing this semicolon and saving the program, and I'm again writing that computation statement
over here, gebreselassie global Nazi people and pressing the end.
So now you can see the exact error.
I say there should be a semicolon after the end of the program, and here I didn't put the semicolon.
So what happened the program through and error and the combination was failed.
So in order to make this successful and flipping the semicolon again, saving the program again and
running the completion call or the statement now it's compiled successfully.
So after the competition, we will get an executable file in our system, so you can see over here there
is a file created called in or out.
We just not there previously.
So this is that compiled at the site of that program.
So this is the executable.
No, you need to execute that program.
So our program was created in CBP.
We have compiled it and we have created an executable file, which computer can understand.
So if I try to open this executable file in some kind of extended test, you will be getting the idea
like what it will be looking like.
So I will just open it in some sort of program.
Let's go with the text editor and an opening that see here.
We have a lot of things, but we don't understand anything.
This means this is the actual compiled version of our program.
It's not in that sense which we understand because it's something else.
It's something understandable only to the computer.
So we need not to worry about this.
What we can do is like we can execute this file.
So to execute this 8ot out, which is a result of my comp. Hello world, not CBB, I have a comment.
Let's go to that comment.
Dot slash here, dog.
So my file name of the campaign file name is, you know, now and I am writing Dot Slash to execute
backward and embarrassing.
And so now you can see how older dog here, which is that the side of my program so you can see how
many statements we have here in our particular programming language, C++ in order to just print Hello
World and the council.
So think about the large programs in the hour, the software's in the market or a play store, or even
the system or the computer, which we use.
How many lines it should probably have to create to such a complex program?
Right.
So that is one thing which you have to think, and this is how we execute C++ program.
So pretty much in this module, we have covered our topics.
We discussed the basic understanding of programming, what is programming?
And we also discussed the peculiarities of programming languages, C++ and also we have seen how to
write their basic C++ program, how to run or how to compile it.
So I hope this year that you have understood pretty much everything, and I suppose you should have
some confusions here and there because it should be there because this is just an introductory section
and moving further, we will be learning much more about this programming language and we will be understanding
why we will be using all these things and we will be understanding more concepts, which we discussed
in just a small portion or like in a summary here in this unit, more in depth in comment on it.
So you will be able to understand more things.