Record and pointers
Posted on 2004-03-26
I have a record with strings, integers and booleans.
I read the data into the record from several files and need to store them in the memory.
In my program I have an array [1..500] of record.
I don't know how many records are to be used for each time, so 500 here is just a guess. I could set it to 1000 or even 2000 just to be sure but I see it as a waste of memory.
I think the best here would be to use a pointer for the record. I have forgot most about using pointers so I need some help here.
I need to know how many reords are read and also access any of them by index.
I know you experts can help me
If you could give me a litle sample how to declare, allocate memory, read data into the record and access any of it.