operator overloading

Hi hi,

is it possible to use operator overloading to overload an "[][]" operator instead of just "[]" ?

What I would like is that upon reading


the program would go to a member function of the class that myContainer belongs to
and pass it the arguments i and j.

No. You would have to use a proxy type or something. Just overload operator() instead.
Is it "[][]" really a different operator than "[]"? Intuitively I guess it´s just the same thing twice: serching for an index inside something that´s been pulled out of an index as well...

Topic archived. No new replies allowed.