Hey guys RPA here, with yet another question. So I was using Visual Studio 2015 (Community) to code a console app that uses File I/O. I was working fine with the headers iostream and string, but when I included fstream, the problems started. I wrote the following code:
After I wrote this down, I noticed the intellisense had a red underline under the word fstream. Upon inspection, it said, "identifier fstream is not defined". To change my code, I changed the header to ofstream, and the line:
fstream outfile("data.txt",ios::app | ios::out);
to
ofstream outfile("data.txt",ios::app);
, but then it said that the header ofstream was not found and ofstream was undefined. I even tried ifstream, but to no prevail.