I'm having problems creating an array with a dynamic size using new.
Here is the relevant code:
enum LandCondition
{
Bad,
Good
};
//...
int IMG_WIDTH, IMG_HEIGHT;
LandCondition* land;
//...
land = new LandCondition[IMG_WIDTH][IMG_HEIGHT];//causes errors
The errors VC++ gives me are:
error C2540: non-constant expression as array bound
error C2440: '=' : cannot convert from 'LandCondition (*)[1]' to 'LandCondition *'
What's causing this? I've done things similar to this before without issues.