So if I am translating all that, things will be arranged like this and I will be starting from the
beginning in that fight.
OK, so that's it on that topic.
Now moving to the read and write to a file mechanism so you can read from a file or write to the file.
So while doing C++ programming, if you want to write information to a file, then you will be using
this operate upstream insertion operator.
And if you want to read from, in fact, you will be using steam extraction.
Operator That means you are getting the value from the key or a keyboard.
Similar to that, you are reading that fire information and writing it to this screen right now to process
by.
And it's very simple.
You can just use this function.
Roy Glass.
Now we do have some more things to cover oneness and other handling files or checking for failure in
finance.
So suppose I if I am opening a file, then some sometimes that file may not get to open.
And there that is a Jansa era is coming.
So if I'm not able to open a file or if I'm not able to write you a file, similar kind of a task and
occurs with or covered files in C++.
So in order to handle those things, we are using some clauses or some integers or flags like these.
So these are the names of some file handling flags, and you can check the value of these flags and
get to see if the file has any kind of at us.
So if the EOI.
So all these things are actually already defined inside the program, so you can just see all this and
see that's an exercise for you again, after creating it by writing some things to it, you can try
coding each of these bits.
Just write code and see what will happen.
So what will be the meaning of this if you're a bit equal to one, if you are still doing that and you
are getting one, then that means the end of violence reached.
That file was completed reading or writing and the hours that end of the fight.
If it is zero, it means like we are not in the end of the fire and fail.
But if there is any kind of input output error and we cannot write something for the file or reading
something from the file, then this failed will be said to one OK and bad, which also is same.
But it set fact an input output, a critical error.
And this is not that, let's put it together.
That's the difference between very good and bad, and it's like having zero value when the file is actually
read, read or write successfully, then the value will be zero.
Now we do have some more useful functions in file, so you can refer to this slide for that.
And you can see, like if I am inside a file, the problem is like we are not able to see anything in
the file.
So if I am opening a file which is already written and these were the key words of the file.
Let me give welcome to happy learning.
So this was the content inside my files, and if I have opened the file, then there is a chance that
my God, a set is somewhat higher here.
So last and I have closed the file by reading until all in this line.
Then my concern will be here.
It will be saved, right?
But the problem is this file.
We are not able to see this file unless we print out of the fight.
So in order to know the position of the binder current position of the blind at the and or like if you
want to move the blind at the beginning or to the end, depending on our use case, how you like and
probably I want to read the file from the beginning, like, welcome to happy learning.
But what will happen if my point I was in this position?
Only the content from this position that is on me to learnings will be getting to me right.
So in order to read that and to move this blind at the beginning or end on an item, you want a lot
of special functions in this programming.
So those are actually discussed over here.
So DLP means it will give me the current position of that binder and belge means it will get me the
composition of that get binder.
So that is like.
Do buying this one is get behind it and why not put behind it, get by and that is actually used for
reading purposes and put Binder is used for writing purposes, so they are to organize this one for
reading and one for writing.
Let it with this be get binder.
And this we put Binder.
Then if I'm starting to read the file from here, then it will be like, Welcome to happy landings.
But if I'm starting to write the fly, it actually, if I'm trying to change that, I'll use it will
actually come from here.
So that's it.
Then see, we will help you do that.
Put Binder to specify a location.
This is the syntax of that.
CMG will help you to move the function like move up, get behind it.
But that desired location.
So what means it, like a single character file and get means it reads as single character from me.
And there are a lot of other operating models.
Big Eyes Big will help you to read from the beginning of the file or right from the beginning of the
file.
Askren will return the current position of the blind US and iOS and will help you to reach that end
of that file.
OK, you can start from then read or write.