Original Post
Hi, I'm trying to find a nice way to implement a string class that is based on an array class.. currently i have this working: However, I don't really want my string class using inheritance like this, I'd rather it used template specialisation, but I can't figure out a nice way of doing it :( The closest I've gotten is using a typedef embedded in a class, but that leaves me having to say: Ideally I just want to be using something like: Has anyone found a way of achieving this? Am i missing something obvious? I've considered using a #define for it.. which would leave me with: I suppose that's ok.. but I don't like it much.. :) Thanks for any help, Hybrid
template<sint32 MaxLength>
class tString : public tArray<char, MaxLength>
tString<64>::Type Variable;
tString<64> Variable;
#define tString(MaxLength) tArray<char, MaxLength>
tString(64) Variable;