Original Post
i have two arrays one holds 97 names (pAIDataFile->pAIData->pAIDriverData.DriverName) and oone has 33 names (pAIDriversThisSeason->pAIData->pAIDriverThisRace[j].DriverName) whhat i m doing is trying to compare the names so i can pass the ID of the name. But when i do my loop the strcmp does not seem to be working it keeps treating the if statement as true and going into the if statement, i have checked the names and they are always changing and should not be true ? by the way the .DriverName is = char DriverName[32]; the code is in C
char *name1;
char *name2;
for(i=0;i<pAIDataFile->pAIData->nbAIDrivers;i++)
{
name1 = pAIDataFile->pAIData->pAIDriverData.DriverName;
for(j=0;j<pAIDriversThisSeason->pAIData->nbAIDrivers;++j)
{
name2 = pAIDriversThisSeason->pAIData->pAIDriverThisRace[j].DriverName;
if(strcmp(name1,name2)==0) ;
{
pAIDriversThisSeason->pAIData->pAIDriverThisRace[j].DriverID = i;
}
}
}