| View previous topic :: View next topic |
| Author |
Message |
Florian Weimer Guest
|
Posted: Mon Sep 01, 2003 2:31 pm Post subject: Re: Warum darf function nicht const sein? |
|
|
Andreas Dunke <NO_SPAM_adunke (AT) maku (DOT) de> writes:
| Quote: | Warum darf die Function getNames() nicht const sein?
|
Weil Du einen iterator statt eines const_iterators verwendest. Nur
const_iterator-Objekte werden von der const-Variante der
begin()/end()-Methoden zurückgegeben.
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
Andreas Dunke Guest
|
Posted: Tue Sep 02, 2003 6:07 am Post subject: Re: Warum darf function nicht const sein? |
|
|
Florian Weimer schrieb:
| Quote: |
Warum darf die Function getNames() nicht const sein?
Weil Du einen iterator statt eines const_iterators verwendest. Nur
const_iterator-Objekte werden von der const-Variante der
begin()/end()-Methoden zurückgegeben.
Das klappt jetzt. Danke (auch an die anderen beiden Poster)!! |
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
|