So now let's move that dam.
This is a kind of a complex topic because you don't have sufficient ways to visualize what's happening
inside, but you have to think and understand this properly, like how the fine is actually getting
working and how that Gaza in order like if you are putting it not bad or if you are opening a word document,
you can see the concept of it.
But if you are putting that file programmatically in C++, you will not be able to see the cursor that
is the cursor or leave from the cursor and you can read or write, right?
So based on the cursor, you want to change that position of the characters.
So that's maybe going to be using all these functions.
So now let's move to a quick and simple demo of files.
Let me move to Visual Studio Core, where we have a good example for fires.
Let's start here.
So if you look into this program, you can see if stream had refining included because without this
extreme fire, we will not be able to do anything with files.
And here I am, trying to create the array, which holds about 200 characters, and I am actually creating
a file of steam outside.
Here is my fire object, and I'm using this by an object to create a fire look like if I ended up dead.
It is also a file type like explains.
OK.
So if you want, you can change this data and you can always use the SDR.
So that's also that will also work fine.
Now I want to write something into a fire, so I am asking and tell you a name and I am using senior
get line function.
So what happens when you are using not that name function?
It will get that line from the keyboard and it will store that in this regard data.
Now I am using the old object and using the stream insertion operator to write they attached to that
file, so I would fail, then this operator determines it will be writing the data, which I have from
the right to the following year filed our daddy file right.
So then I am asking for it.
This is also similar.
Then it's like inputting that data then.
Now that similarly and then I am closing the open file right here.
I have already discussed the steps one opening the file, then writing the file, then closing the pie.
OK.
Once that disclosed, I want to read the data from the file.
So I am again opening the same file, a file in our debt.
But here I am, using a female object to create a file, object calling file and in file is used to
open my file.
Then I am reading from the file.
Then I'm showing that in fact to data.
So I am reading the data from the file and storing it to all this variable data.
Then I am printing that data again, turning the data.
Second line.
Then I'm writing that to screen, counting that scanning, finally and closing that.
So this is the explanation of the problem.
So any program?
So now let's see.
How would this actually getting worked?
So the plus plus file starts CBP and now we have or file ready are slashing it out and see right into
the file.
We are actually writing to the file and your name and your age 25.
OK, I have the print leading from the front, then printing the data from the back.
So here we have created a file and we have already read and have read and written into that file.
You want to see that back?
Let me open that and be sure to record for you.
Or let me see if I loaded this year, right?
My did daddy's here and bring that.
See, here we have the file, right?
We having that.
What up?
What are the things we have written into that that is there and we have already used it?
So we have created this file data programmatically and we have added the daytime, read the data from
that programmatically.
So now what we have seen on this lecture is how we can create a file programmatically, how we can add
the data or build the data from it programmatically, or how we can write that data and do it programmatically.
Hope you understood this concept.
It's a bit like we are using some inbuilt functions and objects, and based on that, you will be reading,
writing and doing everything from file.