Maybe someone can help me with this: i want to define a constant array using a aggregate initialization list within the class definition in C++
normally an aggregation list can be used like this
const int i[] = { 1, 2, 3, 4 };
in a class definition you have to use the static keyword - but the following does not work
static const int i[] = { 1, 2, 3, 4 };
i am getting errors like "error C2059: syntax error : '{'", "error C2334: unexpected token(s) preceding '{'; skipping apparent function body"
for some reason the compiler thinks this aggregate is actually a function.
how can i do this correctly and why is it not working?