[Tuxcpprogramming] Re: Accessing operator[] within a class

Mark Phillips mark at austrics.com.au
Mon Jul 9 19:26:54 UTC 2001


This worked!  (Pun not intended:-)

Thanks,

Mark.

Andy Zivkovic wrote:

> For some reason, I can't send messages to the mailing list, but since no one
> else has replied on list, have you tried:
> return (*this)[row*10+col];
>
> good luck,
> Andy
>
> > class myVector: public vector<int> {
> >   int table(int row, int col) const {
> >     return [row*10+col];
> >   }




More information about the tuxCPProgramming mailing list