Well, I know that in C ++ a - let it be said that a 2-dimensional array can be initialized as follows:
int theArray[5][3] = { {1,2,3}, {4,5,6}, {7,8,9}, {10,11,12}, {13,14,15} };
Now, if I want to use pre-existing arrays as theArray elements?
for example
// A, B, C, D,... have already been declared as : // `const U64 A[] = { 1,2,3,4 };` etc... const U64 multiDimArray[12][64] = { A, B, C, D, E, F, G, H, I, J, K, L };
This one throws an error though:
cannot initialize an array element of type 'const U64' (aka 'const unsigned long long') with an lvalue of type 'const U64 [64]'
I see the point, but I hope you can see mine.
Is there a workaround so I can easily achieve the same? (Any suggestion - perhaps using Boost? - welcome)
c ++ c arrays multidimensional-array clang
Dr. Kameleon
source share