Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<class T>
- void List_vector< T >::canc_elemL1_from_listL2(const List_vector<T>& Lista2){
- position pos;
- position pos_l2;
- pos = begin();
- pos_l2 = Lista2.begin();
- // cout << Lista2.read(pos_l2) << endl;
- while(!end(next(pos))){ //cout << read(pos) << endl;
- while(!end(next(pos_l2))){ //cout << Lista2.read(pos_l2) << endl;
- if(read(pos) == Lista2.read(pos_l2))
- erase(pos);
- pos_l2 = next(pos_l2);
- }
- pos = next(pos);
- pos_l2 = Lista2.begin();
- }
- }
Add Comment
Please, Sign In to add comment