In the while loop before that I check for k not to exceed 14 or 8. But I redundantly input an if statement just to make sure. Thanks.
Printable View
In the while loop before that I check for k not to exceed 14 or 8. But I redundantly input an if statement just to make sure. Thanks.
>In the while loop before that I check for k not to exceed 14 or 8.
That's the problem.
Assume k is 8 after the loop. SoCode:char temp[8];
while(i<indexn && k<8)
{
temp[k] = rfname[i];
k++; i++;
}
temp[k] = '\0';
But there is no temp[8].Code:temp[8] = '\0';