D
David
Hello,
Is it possible to have a structure in a base class be expanded in a derived
class using the same memory area. In other words:
typedef struct tagStructA
{
int a,b,c;
} sStructA;
class CMyClass
{
sStructA m_StructData;
...
};
// not sure if I can typedef like this for the derived structure??
typedef struct tagStructB : sStructA
{
int d,e,f;
} sStructB;
class CMyDerivedClass : public CMyClass
{
sStructB m_StructData; // using same memory location as m_StructData from
sStructA
...
};
??????
TIA!!
Is it possible to have a structure in a base class be expanded in a derived
class using the same memory area. In other words:
typedef struct tagStructA
{
int a,b,c;
} sStructA;
class CMyClass
{
sStructA m_StructData;
...
};
// not sure if I can typedef like this for the derived structure??
typedef struct tagStructB : sStructA
{
int d,e,f;
} sStructB;
class CMyDerivedClass : public CMyClass
{
sStructB m_StructData; // using same memory location as m_StructData from
sStructA
...
};
??????
TIA!!