A multidimensional array class
Abstract
Originally published in C/C++ User's Journal, Vol 15, No 7, July 1997 CCUJ: Vol 15, No 7A multidimensional array class | C/C++ Users Journal We use the template and inheritance features of C++ to create an array class with several desirable properties:It is self-describing. Given an array object (or a pointer to one) it's possible to learn the number of dimensions and the lower and upper bounds for each dimension (the shape of the array). This "self-describing" feature make it safe to pass pointers to arrays.It is as easy to use as C/C++ arrays. The usual subscript notation is used to access an array element. It is almost as efficient as C/C++ arrays.It can be easily extended to any dimensionIt supports range checking and has the capability to raise range violation exceptions.It can be extended to support variable-size multidimensional arrays.
Fields of Study & Subjects
Optimization and Packing Problems
Advanced Manufacturing and Logistics Optimization
Publication details
- Journal / source
- Figshare
- Volume
- 15
- Issue
- 7
- Pages
- 39–41
- Publication date
- 1 January 2026
- Language
- EN