Hi,
I'm having a problem with being forced to use constants in my program.
At one moment, I try to do
AUX_RGBImageRec *TextureImage[nb_textures];
and my compiler complains that it was "expecting a constant expression". The problem is that I cannot define a constant with the right value because I don't know what that value is before runtime.
nb_textures is a member variable of a class and is set when the class is instantiated. I tried stuff like defining a constant in my class and initializing it to that same value but the compiler isn't dumb enough to be satisfied with that. I guess it follows the chain and sees that ultimately nb_textures is not a constant.
So I'm asking you guys how I can trick the compiler into thinking that it's given a constant. It's probably something really simple but I'm not really experienced and I am slowly learning the stuff.
Thanks in advance