Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to input an ID number into a program and have it go to that particular ID and then input a series of numbers into an array that is present there...how would i go about doing this?
ID is a record and i need to refer to another field in this record which has an array in it, i need to enter values
hope you guys can help
ID is a record and i need to refer to another field in this record which has an array in it, i need to enter values
hope you guys can help
Code:
void enter_numbers(number *ptr)
{
int num,i,j,k=0,total;
for(i=1;i<counter;i++,ptr++)
{
total=0;
printf("\n\tEnter ID number");
scanf("%d%",m);
for(j=0;j<8;j++)
{
printf("\n\tEnter the results for this ID",j);
scanf("%d",&k);
ptr->score[j] = k;
total=+k;
}
ptr->total_score =total;
}
}