I need to open a file to read to and write to at the same time.
I cant do
infile.open(....)
outfile.open(...)
...
...
..
outfile.close();
infile.close();
It there a way to do this??
I need to open a file to read to and write to at the same time.
I cant do
infile.open(....)
outfile.open(...)
...
...
..
outfile.close();
infile.close();
It there a way to do this??
Write and read at the exact same time? I don't see why you would need to, and I don't know of any way to do it.
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
Look into the fstream class.
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
Heres a link to a good tut about file I/O
File I/O Tutorial
For your case check out the link on Managing I/O streams
Woop?