A Class Template for N-Dimensional Generic Resizable Arrays
By Giovanni Bavestrelli, December 01, 2000
Need dynamic arrays that are efficient and intuitive? Try a little template recursion and specialization.
December 2000/A Class Template for N-Dimensional Generic Resizable Arrays/Listing 2
template <typename T, unsigned int N>
class Array
{
T * m_pArrayElements; // C array storing all Array elements
public:
ReturnType operator [] (unsigned int index);
const ReturnType operator [] (unsigned int index) const;
};