can anyone tell me why this search wont work?? its driving me crazy the code seems ok but it wont work......any help appreciated, thanks
Code:int SearchDetails(void){ char SearchName[30]; int n; cout << "Please Enter Person Name to search: "; gets(SearchName); for(n=0; n<50; n++){ if(SearchName == Names[n].getName()){ cout << "\n"<< Names[n].getName(); cout << "\n"<< Addresses[n].getAddress(); cout << "\n"<< TelNumbers[n].getNumber(); } } return -1; }