Why doesn't
typedef [I]ClassName[/I] SomeName[[I]SomeSize[/I]][[I]SomeOtherSize[/I]];
work?
My mistake, poster below me is correct.
const int SomeSize = 5;
const int SomeOtherSize = 5;
class ClassName
{
};
typedef ClassName SomeName[SomeSize][SomeOtherSize];
Something else to consider :
template<typename T, int ROW, int COLUMN>
class Array2D{
private:
T _array[ROW][COLUMN];
public:
Array2D(){/*initialize _array*/}
//Array2D methods/operations
};
int main(){
Array2D<int,5,5> array;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.