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(\
You can use istringstream for that.
istringstream
string text = "text..."; istringstream file(text); string line; while(file.good()) { getline(file,line); }