Answer the question
In order to leave comments, you need to log in
Compare file string extensions?
There is such a code, it should add the strings, but in the end we have a non-icilized variable, although the input string is suitable for one of the ifs
void__ Scene2::LoadImage(const ILstring path)
{
ILenum ext;
ILstring str="";
int__ l=strlen(path);
while(--l>0&&path[l]!='.')
str+=path[l];
if(strstr(str,"gnp"))
{
ext=IL_PNG;
}
if(strstr(str,"gpj") || strstr(str,"gepj"))
{
ext=IL_JPG;
}
if(strstr(str,"pmb"))
{
ext=IL_BMP;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question