Hello all,
I know it is possible to overload the bracket symbol '[]', and I know how to do it. I was wondering, is it possible to overload the double-bracket symbol? I have a matrix class. I am doing the following:
Does this seem right, such that I can do something like the following in my main program?Code:class Matrix { ... double** operator[][](int&, int&); ... };
Thanks.Code:Matrix A; ... //assign some values cout<<A[2][2];
Bill



LinkBack URL
About LinkBacks


