class StringTable : public Vector<String> { public: StringTable &operator,(const char *s) { Add(s); return *this; } String operator[](int i) { ASSERT(i < GetCount()); return GetLngString(At(i)); } }; #define STRINGTABLE(s) StringTable s; INITBLOCK { s, #define ENDTABLE ; }
STRINGTABLE(Test) tt_("One"), tt_("Two"), tt_("Three") ENDTABLE;
Report message to a moderator