Original Post
Hi,
I'm strugging/ staring blind at a fairly simple 'issue'.
I have an array of strings and want to find out the number of unique strings, the strings are stored in tempTexFiles[]:
[source lang="cpp"] int pNrUniqueMaterials = 1;
bool NEW = false;
for(int texcount=1;texcount {
for(int tlist=0;tlist {
if(tempTexFiles[texcount] == tempTexFiles[tlist]) break;
else NEW = true;
}
if(NEW)
{
pNrUniqueMaterials++;
NEW = false;
}
}
mNrMaterials = pNrUniqueMaterials;
[/source]
Probably something to simple for words, been staring at it for an hour.
The results now is 5 and should be 3....
Any help is really appriciated.
greets,
Cris
I'm strugging/ staring blind at a fairly simple 'issue'.
I have an array of strings and want to find out the number of unique strings, the strings are stored in tempTexFiles[]:
[source lang="cpp"] int pNrUniqueMaterials = 1;
bool NEW = false;
for(int texcount=1;texcount
for(int tlist=0;tlist
if(tempTexFiles[texcount] == tempTexFiles[tlist]) break;
else NEW = true;
}
if(NEW)
{
pNrUniqueMaterials++;
NEW = false;
}
}
mNrMaterials = pNrUniqueMaterials;
[/source]
Probably something to simple for words, been staring at it for an hour.
The results now is 5 and should be 3....
Any help is really appriciated.
greets,
Cris