H
Howie
Hi,
i have a normal class:
//test.h
class CForwardData;
class CTest
{
CForwardData *pData;
public:
//Methods to access the data.
// some other stuff...
CTest::CTest();
CTest::~CTest();
};
//test.cpp
class CForwardData
{
public:
long aLong;
double aDouble;
};
CTest::CTest()
{
pData = new CForwardData;
}
CTest::~CTest()
{
delete pData;
}
//... Methods to access the data............
This is the normal way i am using to hide the data implementation for
any user, who has access only to the *.h files.
Is there a other c++ way to do the same without using the forward
declared class ?
Thanks everyone,
Howie
i have a normal class:
//test.h
class CForwardData;
class CTest
{
CForwardData *pData;
public:
//Methods to access the data.
// some other stuff...
CTest::CTest();
CTest::~CTest();
};
//test.cpp
class CForwardData
{
public:
long aLong;
double aDouble;
};
CTest::CTest()
{
pData = new CForwardData;
}
CTest::~CTest()
{
delete pData;
}
//... Methods to access the data............
This is the normal way i am using to hide the data implementation for
any user, who has access only to the *.h files.
Is there a other c++ way to do the same without using the forward
declared class ?
Thanks everyone,
Howie