Derive from CString, but access CString buffer (VS2005)
Posted on 2007-04-09
I'm copying code from a VC++ 6.0 project to VS 2005. The code has a string class derived from CString in which some members of CString are accessed (m_pchData, GetData()). The code compiles in VC6 but not in VS2005. I need to be able to do:
class CStringEx : CString
// Access private members of base CString
char* inside_buffer = m_pchData;
char* inside_buffer = GetData();
It's just the syntax is tricky since it's a template class and I guess the members are private now...?