/*The above code is what I am using but I keep getting the error found in the title. Any suggestions as I am at a loss. I've used getline plenty of times before but never really in conjunction with classes and files. Any assistance would be appreciated. Thanks.
Re: error: no matching function for call to 'getline(std::ofstream&, std::string&, char)'
Duoas,
Thanks for your reply. But if I have to read a string in from an outfile what would you suggest?
-- Curtis Sumpter
ps. I realize this goes counter to the idea of an outfile but it is part of an assignment so the design of the program is not of my making. Thanks again.
Re: error: no matching function for call to 'getline(std::ofstream&, std::string&, ch
You can't read from an output file. Data goes out, not in. That's the whole point.
You can create a file that has both read and write access. fstream inAndOut( "fooey.txt", ios::in | ios::out | ios::trunc );
But that's a different thing.
(BTW. I put that ios::trunc flag in there because you might find it handy when doing your homework. It causes the file to be overwritten every time you open it, so it operates like an output file, but with read access.)
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.