I'm trying to do something like this:
int x=128, y=256;
std::vector<std::array<float,x*y>> codes;
Obviously this is wrong, while this is correct:
std::vector<std::array<float,128*256>> codes;
One solution to the first problem could be using macros like:
#define x 128
#define y 256
...
std::vector<std::array<float,x*y>> codes;
But I was wondering if there is another solution at run-time and not compile-time. Notice it's not necessary to use std::array
, I need a std::vector
of arrays (or whatever) of x*y
elements.