Hi, all,
I want to use an interator of this type:
set<MyObject, lt<MyObject> >::iterator i;
I think I can use statement like this:
1. (*i).x+=1.0;
or
2. MyObject& t=*i;
But the g++ compiler always think "i" is a const_iterator,
it give error for 1, and warning for 2.
Who can tell me why?
Sincerely Yours,
FengLou Mao
*******************************
ADD:Mr. FengLou Mao
Institute of Physical Chemistry
Peking University
BeiJing
P.R.China
Tel:86-10-62756833
Fax:86-10-62751725
- Re: stl const_iterator question. Fenglou Mao
- Re: stl const_iterator question. Martin v. Loewis
- Re: stl const_iterator question. Fenglou Mao
- Re: stl const_iterator question. Martin v. Loewis
- Re: stl const_iterator question. Martin v. Loewis
- Re: stl const_iterator question. Fenglou Mao
