int numLines = 0;
string unused;
while (getline(users, unused))
{
++numLines;
}
cout << numLines << " Clients Found" << endl;
//begin the search
string search;
string line;
while(client.empty())
{
cout << "Queue: ";
//Display What The User Typed
getline(cin,search);
//Make it capital
transform(search.begin(), search.end(),search.begin(), ::toupper);
cout << search << endl;
getline(users,line);
stringstream ss(line);
string line_part;
//search each line
int l = 0; //line variable
while(l < numLines)
{
getline(ss, line_part, '.');
size_t pos;
pos=line_part.find(search); // search
if(pos!=string::npos) // string::npos is returned if string is not found
{
if(search == line_part)
{
cout << "Queue: " << search;
cout << "\nFound Match";
client = search;
break;
}
else
{
cout << "Queue: " << search;
cout << "User Not Found\n";
}
}
else
{
cout << "User Not Found\n";
}
users.clear();
l++;
}
}
there is my code that ive having problems with
USER.0.8.11.1992.0.3376939905.END.
MASTER.0.8.11.1992.0.3376939905.END.
ADMIN.0.8.11.1992.0.3376939905.END.
this is the file that its putting the users from. can anyone help?