Question:I want to create an array of TStringLists to use in my application. But I keep getting access violations when I try this: TStringList * MyStrings = new TStringList; How can I create this array?
Answer:The reason you are getting th AV is VCL objects must be created on the heap. Here is a code snippet that creates an array of TStringLists.:
typedef TStringList * MyLists;
MyLists * MyStrings = new Test;
for (int i =0; i <10; i++)
Last Modified: 28-OCT-99