Subj : Re: Declaring a Dynamic String To : borland.public.cpp.borlandcpp,borland.public.cppbuilder.language.cpp From : Andrue Cope [TeamB] Date : Tue Nov 09 2004 08:09 am DKat wrote: > So - does anyone have a clue what I'm trying to convey > and how to deal with it properly? You could create a two dimensional array of AnsiStrings but the size isn't fixed so you'd have to do that on the heap. That's perfectly possible but a PITA. How about using std::vector? typedef std::vector ColumnOfAnsiStrings; typedef std::vector GridOfAnsiStrings; WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { GridOfAnsiStrings grid; for( int columnIndex=0; columnIndex<10; ++columnIndex ) { ColumnOfAnsiStrings column; for( int rowIndex=0; rowIndex<10; ++rowIndex ) column.push_back( AnsiString( columnIndex )+ ","+AnsiString( rowIndex ) ); grid.push_back( column ); } ShowMessage( grid[ 5 ][ 6 ] ); // "5,6" } -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html .