Guest User

Untitled

a guest
Feb 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. template<class T>
  2. void List_vector< T >::canc_elemL1_from_listL2(const List_vector<T>& Lista2){
  3. position pos;
  4. position pos_l2;
  5.  
  6. pos = begin();
  7. pos_l2 = Lista2.begin();
  8.  
  9. // cout << Lista2.read(pos_l2) << endl;
  10.  
  11. while(!end(next(pos))){ //cout << read(pos) << endl;
  12. while(!end(next(pos_l2))){ //cout << Lista2.read(pos_l2) << endl;
  13. if(read(pos) == Lista2.read(pos_l2))
  14. erase(pos);
  15. pos_l2 = next(pos_l2);
  16. }
  17. pos = next(pos);
  18. pos_l2 = Lista2.begin();
  19. }
  20. }
Add Comment
Please, Sign In to add comment