Strange error. What's the problem, man?
Jun 25, 2013 at 4:38pm UTC
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 Jun 25, 2013 at 5:46pm UTC
Jun 25, 2013 at 4:55pm UTC
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 Jun 25, 2013 at 4:56pm UTC
Jun 25, 2013 at 5:01pm UTC
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.