hello
I have the following
while(fgets(b2b_rates_address,1000,in_fp) != NULL )
{
strcpy(rates_details[j].ig1, strtok(b2b_rates_address,","));
printf("rates_details[j].ig7 = %s\n",rates_details[j].ig1 );
strcpy(rates_details[j].ig2,strtok(NULL,","));
printf("rates_details[j].ig7 = %s\n",rates_details[j].ig2 );
strcpy(rates_details[j].ig3,strtok(NULL,","));
printf("rates_details[j].ig7 = %s\n",rates_details[j].ig3 );
j++;
}
The issue i have is this:-
It works fine up to field ig3, this is due to the fact that this field may/may not be empty....the program then bombs out
How can I get round this? any code examples would be appreciated
Many Thanks