Strange error. What's the problem, man?

1
2
 
  Invalid code which tries to change the value of a map key inside the map.









Debug mode:
error C2663: 'std::deque<_Ty>::push_back' : 2 overloads have no legal conversion for 'this' pointer
1> with
1> [
1> _Ty=StaticSlotCountLibrary::WeightType
1> ]
1>
1>Build FAILED.


What's the problem? Do I need to initialize the deque first or what?
Last edited on
The error message I get is more obvious.
error: no matching function for call to ‘std::deque<long unsigned int>::push_back(CountType&) const’

Note the const at the end.
Last edited on
OK. So the deque will not allow any additions. Oh I see. It's a map which has a key. The key must not change so it is declared const. I need to remove the element and then put it back in.
Topic archived. No new replies allowed.