Originally Posted by
Daved
>> every time I try to use any list operation, it doesn't comply
What does that mean? Do you get a compiler error? Does the program fail? Does it crash?
Sorry, I meant complier error.
Code:
error: no match for ‘operator=’ in ‘((Shopper*)this)->Shopper::it1 = ((Shopper*)this)->Shopper::shopList.std::list<_Tp, _Alloc>::begin [with _Tp = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Alloc = std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]()’
/usr/include/c++/4.4/bits/stl_list.h:114: note: candidates are: std::_List_iterator<int>& std::_List_iterator<int>::operator=(const std::_List_iterator<int>&)
Shopper.h: In function ‘void delShop(int)’:
Shopper.h:24: error: ‘shopList’ was not declared in this scope.