strcpy(set1[i].status,datalist[random_number]);
not
strcpy(set1[i].status,&datalist[random_number][20]);
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
You can do that if you want to, but don't go off the end of the array.
strcpy(set1[i].status,&datalist[random_number][<strong>0</strong>]);
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314