Best way to implement a 2d array of ints?
Posted on 2002-06-24
I want to create a simple array of arrays of ints which will serve as a type of lookup table. It will be set up once and not change during execution. First thoughts were just to define as such:
in the header file. This gives an error: member could not be initialized.
How do I use this correctly, and is there a better way to create this table? I considered using some other standard class but since my table size and all values will be known at compile time, I didn't see any compelling reason to. I don't know enough to be sure though. Suggestions?
The items in the table will be used for reference only, no arithmetic or anything being performed.