Init StringArray


#1

Simple one … I need a const static string array, and can’t seem to make it happen.

I’m sure I am missing a simple bit of syntax here, unless StringArrays are not able to be const … which is possible.

So … is something like this possible ?

static const StringArray someArray[2] = {String('la", String(‘lalal’)};


#2

Why not use traditional strings?

You can do this…


const tchar* const someArray[] = 
{ 
   T("la"), 
   T("lalal"),
   0 
};

… then they can be put into a StringArray like this…


const StringArray someStringArray((const tchar**) someArray);