I want to declare a static multidimensional array in my class.
I have done the following:
header (myclass.h):
static int my_array[][][];
source file (myclass.cpp):
MyClass::my_array[3][4][5];
I have the problem of multidimensional array who must have bounds for all dimensions except the first...
Therefore I have tried to write this in the header file:
static int my_array[3][4][5];
And then nothing in the .cpp file.
But this time I got this error in the static functions that use my array: "undefined reference to MyClass::my_array"...
What is the way to solve it?