Thanks for the prompt reply. That made sense so I tried it but came up with a new error:
Code:
binary '=' : no operator found which takes a right-hand operand of type 'AUX_RGBImageRec *' (or there is no acceptable conversion)
This happens when I do
Code:
AUX_RGBImageRec* TextureImage = new AUX_RGBImageRec[nb_textures];
memset(TextureImage, 0, sizeof(void *) * nb_textures);
int nb_true_status = 0;
for( int i = 0; i < nb_textures; i++ )
{
if(TextureImage[i] = LoadBMP(TEXTURE_NB(i)))
{
nb_true_status++;
}
}
The error happens on the line that has the if statement. My guess is that there's a problem with the type but I've been working on this for so many hours that I can't think clearly anymore. The original
Code:
AUX_RGBImageRec *TextureImage[nb_textures];
seems to me like it defines an array of pointers to AUX_RGBImageRec objects if I'm not mistaken. The code that was suggested on the second post
Code:
AUX_RGBImageRec* TextureImage = new AUX_RGBImageRec[nb_textures];
doesn't seem to create the same in my understanding. I can't really follow what it's supposed to create. As soon as I got this fixed, I'm stopping for today
*EDIT*
I tried using
Code:
AUX_RGBImageRec * TextureImage = (AUX_RGBImageRec*) malloc (sizeof(AUX_RGBImageRec *)*nb_textures);
but it gives the same mistake. Is it possible then that the error lies elsewhere?
Thanks