I use the following code to create a new file and write data:
ofstream outfile("out.txt") // line 1 outfile << "b" << endl; // line 2 outfile << "c" << endl; // line 3 // line 4 outfile.close(); // line 5
In Line 4, what code can I use here that will allow me to insert one line of text at the TOP of the two "b" and "c" lines? I basically want to insert one line at the TOP that has a single "a" character. I'm not sure if this is possible.
Any ideas?
jmmc