I have this code. I want to print "FOUND" if the name is found and "NOT FOUND" if the name don't exist. Can someone help me?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
void Fractory::FindByName()
{
string name;
cout << "enter name:"; cin.ignore();
getline(cin, name);
int flag = 0;
for (int i = 0; i < emp.size(); i++)
{
if (name.compare(nv1[i]->getName()) == 0)
{
emp[i]->Print();
}
}
}
|
Last edited on
Many undeclared variables and functions. Please post whole code.