End of file in c++

How do we use End of file while working in a windows console? Because in CB’s IDE we can use ot easily but the console will infinitely take elements?

@MadHawk hey divyam no you can use windows as well
compile your program with this
g++ or gcc program.cpp
and save a text file of inputs
and run like this
a.exe < input.txt

Can you explain the last line

@MadHawk hey divyam basically EOF means end of file and we make a text file of input this passed to the our program the program will extract all the inputs contain in the text file until it the input text file strikes it last elements.
and here we take a input text file of inputs.

1 Like