So, Here I am reading in this Json file and manipulating the values, and I get to a point where I need to see the output... (admittedly I should have done this earlier)
I try (C++)
std::fstream fs;
fs.open ("test.txt", std::fstream::in | std::fstream::out | std::fstream::app);
fs << " more lorem ipsum";
fs.close();
hmm, strange, not working.
I try ofstream, just to make sure.
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.\n";
myfile.close();
uh... still no file.
char filename[]="example.txt";
FileStream *fs = new FileStream(filename, FileMode::Create, FileAccess::Write);
fstream *fs =new fstream(filename,ios::out|ios::binary);
fs->write("ghgh", 4);
fs->close();
ok... this is annoying me now!
I try absolute paths, on all the files above.
nadda.
Hmm maybe the folder is funky and doesn't allow writing to files, so I try `c:\public\Desktop`
Still nothing.
Any guesses of what was wrong?
Answer:
[spoiler]my antivirus was blocking me from creating a file [/spoiler]