0
Pleas give me an easier method to search from a text file or a list file .
Pleas give me an easier method to search from a text file or a list file .
5 Réponses
+ 1
Kainat Rasheed , do something like below:
ifstream input;
size_t pos;
string line;
input.open("t.txt");
if(input.is_open())
{
while(getline(input,line))
{
pos = line.find("hey");
if(pos!=string::npos)
{
cout <<"Found!";
break;
}
}
}
+ 1
happy to help
+ 1
there ways to search... refer below article & few next of these articles for search...:
https://www.sololearn.com/learn/661/?ref=app
0
Ketan Lalcheta thanks ;)
0
Ketan Lalcheta can you please guife me more ... that which topic should i study for this searching