How do I get the fstream to work? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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