0

How do I get the fstream to work?

I’m a complete noob to programming in c++. I was wondering if anybody knows how to make an fstream work properly? Does the fstream “summon” up the text editor file open somehow? I tried following my teacher’s example from class but it doesn’t seem to be working for me.

29th Mar 2019, 10:11 PM
Sarah Bell
3 Answers
+ 1
Do you understand cin/cout? Cin/cout are basically special instances of fstreams mapped to standard in an standard out files, which are, in turn, mapped to the screen. fstream create custom versions of cin/cout that read from named files.
29th Mar 2019, 10:32 PM
Vlad Serbu
Vlad Serbu - avatar
0
like putting in commands such as inFile.open(pathName,ios::in)?
29th Mar 2019, 11:51 PM
Sarah Bell