==========================
#include <fstream>
#include <string>
// ..
string filename; // the file name you want to open
string lines; // store the file lines
// ...
ifstream in(filename);
if (in) {
while (getline (in, lines)) // have no '/n',
{
// ;
// store the lines to a vector or list, use method insert
}
// ...
}
else
{
// open file fail....
}
========================= =
ifstream OpenFile("a.txt");
OpenFile.getline(String,"/n",size);
OpenFile.close();
================================