So, now I'm quite confused about what you are asking for.
What I was trying to say is that you should be able to do:
Code:
for(x = 0; x < sizeof(place) / sizeof(place[0]); x ++)
{
if(strcmp(place[x], pos[i])==0)
{
point[i] = x;
flag=1;
}
}
if(flag==0)
{
printf("\n Invalid place name please re enter: ");
i--;
wrong=1;
}
I also updated your indentation to match the code-flow.
Of course, with the above change, the constant cities array is no longer needed [at least not here, and you should be able to replace it similarly in all other places]
--
Mats