Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FindKey(int value)
- {
- node* temp;
- temp = head;
- if (temp == NULL)
- {
- cout << endl << "List is empty" << endl;
- return;
- }
- else
- {
- while (temp != NULL && temp->key != value)
- {
- temp = temp->next;
- }
- if (temp == NULL)
- {
- cout << endl << "Element does not exist" << endl;
- }
- else
- {
- cout << endl << "Element does exist";
- cout<< endl << "key:" << temp->key;
- cout << endl << "d_variable:" << temp->d_variable;
- cout << endl << "ch_variable:" << temp->ch_variable;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement