Subj : Re: Declaring a Dynamic String To : borland.public.cpp.borlandcpp,borland.public.cppbuilder.language.cpp From : hgiese Date : Tue Nov 09 2004 04:30 pm On Tue, 9 Nov 2004 10:56:56 -0500, "DKat" wrote: >In old days I would simply do a malloc to create a triple array of char as >needed to handle the problem I am now facing but I am now using AnsiString >and while I can figure out how to easily create a single new TStringList >(which I think is what I would use for an array of AnsiStrings) I can't >figure out how to do a double array.... > >What I am doing is setting up a case where you have two dimensions that are >unknown. You have a unknown number of rows of strings and an unknown number >of columns of strings. This is read in as a CSV file which has preceding >the row and column of Strings how many rows and columns there are. How about handling each row with vector and representing your complete table with a vector>? 'vector' seems like a reasonable choice, given that the dimensions of your table won't change. If this might happen, choose a list instead of a vector. 'string' might be std::string but could as well be AnsiString (if you want to tie yourself to Borland :) ). HTH Helmut Giese .