Курсовая работа: Односвязный список на основе указателей
Node *Pointer = pHead;
while (Pointer != NULL) {
if (strcmp(Query,Pointer->Name)==0)
return 1;
Pointer = Pointer->pNext;
}
return 0;
}
void List::SetTail(Node *Pointer) {
if (Pointer->pNext == NULL) {
pTail = Pointer;
return;
}
if (Pointer == NULL) {
pTail = pHead;
return;
}
SetTail(Pointer->pNext);
}
int menu() {
int choice;
cout<<"\n(1) Add entry";
cout<<"\n(2) Add entry after specified";
cout<<"\n(3) Remove entry";
cout<<"\n(4) Print the list";
cout<<"\n(5) Quit\n";
cout<<" Select action: ";
choice = Correct();
return choice;