Re: Two-Dimensional Dynamic Arrays
Axter wrote:
....[color=blue]
> The above link has two classes. One which I'm the author of, and the
> second class which allows you to use both [][] and operator() method.
> I don't think it's a good idea to have both methods in a class, but
> some developers may find this method more acceptable.[/color]
I thought about putting both () and [][] in a class and I came to the
conclusion that you don't want to encourage both methods. You really
only want one, if someone is desperate for a (x,y) method, they can
easily add one.
Axter wrote:
....[color=blue]
> The above link has two classes. One which I'm the author of, and the
> second class which allows you to use both [][] and operator() method.
> I don't think it's a good idea to have both methods in a class, but
> some developers may find this method more acceptable.[/color]
I thought about putting both () and [][] in a class and I came to the
conclusion that you don't want to encourage both methods. You really
only want one, if someone is desperate for a (x,y) method, they can
easily add one.
Comment