To get input from a file, you will have to use ifstream to read data from files as input streams.jigneshdgreatI know how to take input in c++ using standard console functions like cout and cin . But how can I use an external input file to give input to it??
To get output to a file, you will have to use ofstream to write data to files as output streams.
Include this library: #include <fstream>
I hope that helps. 😀
Only logged in users can reply.