ifstream is for file input, and ofstream is for file output(in file stream and out file stream respectively). They allow you to read and write from files.
There's a quick example of a segment of code that will copy a file from [filename_in] to [filename_out]. I hope that helped.
p.s. The destructors for ifstream and ofstream automaticaly close the stream, so in.close() and out.close() are a bit redundant, but it's good programming practice to close your streams. There are some cases where data can be lost if you don't. MYenigmaSELF:-9
myenigmaself@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.