Originally Posted by
serhannn
Thanks for the explanation, but I still don't understand how I can load text files, which I need to search, into a string vector. Should I get them line by line and load into a vector using "getline" or is there another thing to do?
You can load the files in using the fstream.
ifstream inFile;
vector<string> data;
inFile.open("File.txt");
while (!inFile.eof())
{
string sString = inFile.getline();
data.push_back(sString);
}
Something like that should do the trick for filling a vector from a file. It might not be syntactically correct, since I didn't try to compile it.