Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. template< class T >
  2. void List_vector<T>::removelistinlist(List_vector l2)
  3. {
  4.      position p1;
  5.      position p2 = l2.begin();
  6.      value_type elem;
  7.      
  8.      while(!l2.end(p2))
  9.      {
  10.           elem = l2.read(p2);
  11.           p1 = begin();
  12.           while(!end(p1))
  13.           {
  14.                if(read(p1) == elem)
  15.                     erase(p1);
  16.                p1 = next(p1);
  17.           }
  18.           p2 = l2.next(p2);
  19.      }    
  20. }
Add Comment
Please, Sign In to add comment