I have simple text file loaded into memory. I want to read from memory just like I would read from a disc like here:
ifstream file;
string line;
file.open("C:\\file.txt");
if(file.is_open())
{
while(file.good())
{
getline(file,line);
}
}
file.close();
But I have file in memory. I have an address in memory and a size of this file.
What I must do to have the same fluency as with dealing with file in the code above?