All right.
So, so far, we are taking input from our terminal.
And suppose I don't want to take input from my terminal
and I don't like the output that appears on the terminal.
So for that, what I can do is I can simply create two files.
The first one will be input dot p,
and the second one will will be output
dot b, d,
And now I need to include these files
as a read write file inside my mind.
Of all our main CBP file.
So I need to type in here.
F are open and here I need to specify the file name.
So my file name is input dot d d,
which I am going to open it as a read mode file
and it will take the input from standard input.
SD and I so after that
I need to also specify the output file.
So the output file will be output data
and I need to open it as a write mode
and I need to specify SD out here.
Great. So we have said this.
Now let me simply close this one
first and let's do a spec here.
So I'm going to split the input file.
Leo, and I'm going to place the output file just below the input file.
So this is.
So this is a box based that I used to write C++ program.
I have my main file here and on the right hand side,
I place the input file and the output file.
Now in the input file, if I type in the same number,
then then I will get 1 to 10 number displayed.
So let me just simply and encode, by the way,
a lot of things can go wrong here as well, but fortunately we got our right result.
So in the output file, you can see regard the results.
Now I am supposing that some of you are also doing
competitive programing and for that you need a template.
So let me just write the template first
and I will explain you the template and you can just simply copy, paste it
and do it inside your computer program codes.
Right?
So this is that template I use for comparative programing.
And if you are into it, you can also use the same template.
Great.
So basically creating an online did and begging the input and output.
I am using these lines to take fast input and output.
And you know, there are test cases and end calls
calling this function solve and inside this.
So I function I can write in my career grade stuff.
So I think that this is pretty much a for the C++ section,
I will be dealing with debugging and C++ of files and separate section.
That's a matter for the later part of this course, but for now, this is it.
I think that I can assign your homework, so the homework for you will be.
You need to generate this template.
So you need to modify the previous template that we already have.
In that template.
We already have this much of code.
So you need to add these two lines to your template as well.
It's all I think that all of you can do it and if you face any issues
then please comment below and if you have something to say.
And also please write in the comments and I will reply you as soon as possible.
So see you in the next section.