a*********r 发帖数: 7 | 1 #include |
e*a 发帖数: 32 | 2 r u trying to change your "iter" in a "const" method?
【在 a*********r 的大作中提到】 : #include
|
a*********r 发帖数: 7 | 3 thanks, that is a typo, but i still can't assign elements.begin() to
iter in void A::begin(), do u know how to fix that?
【在 e*a 的大作中提到】 : r u trying to change your "iter" in a "const" method?
|
t****t 发帖数: 6806 | 4 how is that a "typo"? show your "corrected" code.
【在 a*********r 的大作中提到】 : thanks, that is a typo, but i still can't assign elements.begin() to : iter in void A::begin(), do u know how to fix that?
|
c****y 发帖数: 24 | 5
const function can not change member data in the class
【在 a*********r 的大作中提到】 : #include
|
S*****n 发帖数: 227 | 6
elements.begin()的类型是 void const;
iter的类型是map< , >::iterator;
你说该怎么改?我不知道。。heihei
【在 a*********r 的大作中提到】 : #include
|
z***e 发帖数: 5393 | 7 faint, the method is "const", then you cannot change anything.
【在 S*****n 的大作中提到】 : : elements.begin()的类型是 void const; : iter的类型是map< , >::iterator; : 你说该怎么改?我不知道。。heihei
|
m******s 发帖数: 612 | 8 map is not a mutable iterator, so mutable can't work here. |