In this lecture, we are going to look at the first component in a c++ program structure.Header Files(Headers).
This is the first component of every c++ program. In our program within the header we find ourselves having a piece of code written, #include <iostream>. However you should note that all lines, I repeat all lines of code begins with a hash sign, some may call it a pound sign, but for the sake of this course we will be calling it the Hash sign.
All lines that start with a hash sign are called directives for the preprocessor. The preprocessor is one stop in the first translation place.
So I have used a new word called “Preprocessor”. Well, rest easy, as I tell you what it means. Well a Preprocessor is a tool that runs before the compilation of the program starts. Then I have mentioned the term Preprocessor Directives, which are just commands to the preprocessor.
So now that you know what a preprocessor means, which one is our directive now?. Well, I think you have been waiting to hear this, the line # include <iostream> let me tell you that this Is a directive.
What does this piece of line do now, this is what you need to know as a c++ programmer before we move on to any other topics.
The #include <iostream>.
This is mandatory, in every code we write, and we are going to write in c++. This piece of code tells the preprocessor to include the iostream standard header file.
<iostream> simply means input and output stream.Remember the see out Hello world, , .what have you noticed there?
Well let me tell you that the header file #include stream, is used to display the output called by the function see out, pronounced as See out.Now I think you got the sense of it.
<iostream> being the standard input and output stream. Here are the other streams we will use as we proceed with c++.
See in being pronounced as “see in”, it is the standard input not output, so you should note the difference between seeing in and see out. See in is associated with the standard input device which is used to take input from the user, which in this case is the keyboard. This we will use it in most of the programs which we are going to write.
See out, I have mentioned it before, well you should know that it is associated with the monitor, and in this case, it is used to display the output to the user.
Well we have reached the last part of the lecture. So in the following lecture we are going to have a look at the second component of the c++ program structure. So stick around.
C++ Header Files.Header Files In C++.C++ Header Files Tutorials.C++ Programming.Programming In Cpp.C Programming.Learn C++.Information Technology.