A
andrew
I am writing a program that involves reading in lots of (ASCII) data,
manipulating it, and then outputting some more. I am using ifstream and
ofstream.
Since I am reading a line, and writing a line at a time, my code can be
quite slow.
Is it possible, to use a memory stream, such that I read the entire
file in to memory first, and then can use it, just like a file stream?
Similarly, can I write to memory, just like I would be writing to a
file, and then write the entire data to disk?
Many thanks.
manipulating it, and then outputting some more. I am using ifstream and
ofstream.
Since I am reading a line, and writing a line at a time, my code can be
quite slow.
Is it possible, to use a memory stream, such that I read the entire
file in to memory first, and then can use it, just like a file stream?
Similarly, can I write to memory, just like I would be writing to a
file, and then write the entire data to disk?
Many thanks.