|
|
|
|
|
|
|
|
|
|
|
|
fr.open("Result.txt")
before you attempt to write anything on the file
(2) initialization constructor Constructs an ofstream object, initially associated with the file identified by its first argument (filename), open with the mode specified by mode. Internally, its ostream base constructor is passed a pointer to a newly constructed filebuf object (the internal file stream buffer). Then, filebuf::open is called with filename and mode as arguments. If the file cannot be opened, the stream's failbit flag is set. |
|
|