Fixed:
Code:
void searchlast()
{
int I, found,f,ptr;
char Sname[25];
ptr=0;
clrscr();
do{
cout<<"Last Name You Are Searching For: ";
gets (Sname);
cout<<"\n";
found=0;
for(I=1; I<=u; I++)
{ ptr=strcmpi(Sname, MyArr[I].namel);
if (ptr==0)
{
cout<<"The Last Name " <<Sname<<" Was Found ";
cout<<"In: "; cout<<""<<MyArr[I].namef; cout<<" "<<MyArr[I].namel;cout<<"\n";
found++;
}
}
if (found==0)
{ cout<<"No one has this last name.\n\n";}
cout<<"Search a new #? 1=Yes | 2=No: ";
cin>>f;
clrscr();
}while(f!=2);
}