There's this homework question i've been wrecking my brain about:
I have to create an array class in C++ in which an index access to an element in the array is checked in compile-time, i.e. if I try to access the array with an index outside ita size it will cause a compilation error.
I thought I'd use enums as indexes instead of ints, but I spoke with my instructor and he told me that it's not the correct way, he also said that "think that for the same price you could use this to have an array where the indexes don't start at 0" or something like that.
I'd appreciate any suggestions!