Im trying to do the copy part of a "deep copy" with my copy constructor:
class myClass
{
public:
myClass ( const char *cPtr, const float fValue )
myClass ( const myClass& myClassT );
private:
const char* &myAddress;
float MyFloater;
};
//myClass.cpp
myClass::myClass( const char *cPtr, const float fValue )
{
// Initialize both private varaible types
const char* &myAddress = cPtr;
float myFloater = fValue;
}
myClass::myClass( const myClass& classType )
{
// copy what we did ...
myAddress = myClass.myAddress;
myFloater = myClass.myFloater;
}
with just that, im getting only the, "must initialize whataver varaible in base/member initalizer list.
They are initalized in the constructor! What would i need to do with the classtype object address?