Alx09

Untitled

Oct 22nd, 2020
2,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. void LCD::DeleteLCD(string &producator) {
  2.     LCD *q = headLCD;
  3.     if (headLCD->ReturnProducator() == producator) {
  4.         headLCD = headLCD->next;
  5.         delete q;
  6.         return;
  7.     }
  8.     while (q->next != NULL && q->ReturnProducator() != producator) q = q->next;
  9.     if (q->next) {
  10.         LCD *p = q->next;
  11.         q->next = q->next->next;
  12.         delete p;
  13.     }
  14.     else
  15.         cout << "\n Monitorul nu exista in baza de date";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment