width/height could conceivably have a different value for each Wads object because they are not static. However, the size of ALL Wads objects must be fixed... so you cannot use them as array sized unless they are static.
The solution, simply, is to make them static const instead of just const:
normal members are copied for each instance of an object:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class example
{
staticint s; // static
int ns; // nonstatic
};
int main()
{
example foo;
example bar;
/* foo and bar both have their own copy of 'ns' because it is nonstatic
Therefore, 'foo.ns' and 'bar.ns' are two completely separate variables.
However, 's' is static, therefore there is only 1 variable and both foo
and bar share it.
} */