dynamic array in Delphi 6

How can I create a dynamic array of a user defined record ?

Andrew
andrewyuAsked:
Who is Participating?
 
DragonSlayerConnect With a Mentor Commented:
umm... try this?

type
  MyRecord = record
    a, b, c: Integer;
  end;

var
  MyArray: array of MyRecord;

and in your code:

SetLength(MyArray, 100);
0
 
andrewyuAuthor Commented:
I tried it, but, I cannot use SetLength.

Andew
0
 
Lee_NoverCommented:
why can't you use SetLength ?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
ginsonicCommented:
Maybe you don't have in uses System unit . Or anothers units that use this one.
0
 
andrewyuAuthor Commented:
Thank you very much.

Problem is fixed.

Andrew
0
 
DragonSlayerCommented:
Oh, thank you very much means a grade C? :)
0
 
andrewyuAuthor Commented:
Actually, I got this answer in previous post. But, got some problem in setlength.

However, setlength is ok now.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.