Passing "classtype" as "this" argument of "class member function" disc

Passing "classtype" as "this" argument of "class member function" disc

Post by Frank Schm » Wed, 15 Oct 2003 16:54:31


wyldhoney < XXXX@XXXXX.COM > writes:

Please don't post HTML to this NG (it seems only the header is HTML).
And please, don't waste space by inserting dozens of empty lines -
rearranged.


please post compilable code next time - guessing your error without the
source code is impossible most of the time (except for this time :-)

you are calling the size() member function on a const Safe_Array object
- since size() isn't declared const, you aren't allowed to do that.
Your options are:
- omit the const on your Safe_Array object
- declare size() const (probably the better idea, since it shouldn't
change the object, should it?)

HTH & kind regards
frank

--
Frank Schmitt
4SC AG phone: +49 89 700763-0
e-mail: frankNO DOT SPAMschmitt AT 4sc DOT com
 
 
 

Passing "classtype" as "this" argument of "class member function" disc

Post by Ahti Legon » Sat, 13 Dec 2003 21:32:59

wyldhoney ::


Looks like Safe_Array::size() is non-const member function while the object
you are calling this function for is const.