Hi experts,
i have this line of string: a1,b2,c3,a2,b1,c2,a3,b2,c4,
from this line,i want to load into a string array like this:
array[0]=a1,b2,c3,
array[1]=a2,b1,c2,
array[3]=a3,b2,c4,
seriously i have no idea at all.ive done sumthing but looks like rubbish.i really hope dat u experts can help me.
thanks for advance
void seeding()
{
char seed_array[100];//line of characters in this array
printf ("seed real=> %s\n",seed);
char *p=NULL;
for (int i=0;i<= 100;i++)
{
p=strchr(seed,',');
if (atoi(p)==3)
{
strcpy (seed_array[i],p);
*p='\n';
}
printf ("seed array=> %s\n",seed_array[i]);
}
printf("seeding test is running!!!!\n");
}