Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

records

Status
Not open for further replies.
Dec 5, 2004
3
US
hi i hope you guys can help me as my life depends on it :(

I have an array of records and have to access one of these records and change a fields value. How would I go about writing the code for this?

eg i have a structure already defined and one of the fields is called score, how would i access this field in the record and assign a set of values, i need to add 9 values to this record as the person has 9 scores. Incrementing the pointer would move it down to the next element, but i need to input this data all in the same record.

Is it possible to assign more than one value in a field as i need to input 9 values for each person,all in one field!

i`m so confused:(

i`ve been using this syntax.. ptr->score

 
instead of ptr->score use person.score where person
is your array of records.
if each person has multiple scores define score as an
array of int within the person's record.
Thus you access the fields with person.score[j].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top