#include
"
stdafx.h
"
#include < iostream >
using namespace std;
class Base
... {
public:
virtualBase&operator=(constBase&a)
...{
cout<<"Base="<<endl;
return*this;
}
} ;
class Devide: public Base
... {
public:
virtualBase&operator=(constBase&a)
...{
cout<<"Devide=(override)"<<endl;
return*this;
}
Devide&operator=(constDevide&d)
...{
cout<<"Devide="<<endl;
return*this;
}
} ;
int _tmain( int argc,_TCHAR * argv[])
... {
DevidedObj1;
DevidedObj2;
/**//*BasebObj=dObj1;
Base&bObjRef=dObj1;*/
BasebObj;
Base&bObjRef=dObj1;
bObj=dObj2;
bObjRef=dObj2;
dObj2=dObj1;
return0;
}
#include < iostream >
using namespace std;
class Base
... {
public:
virtualBase&operator=(constBase&a)
...{
cout<<"Base="<<endl;
return*this;
}
} ;
class Devide: public Base
... {
public:
virtualBase&operator=(constBase&a)
...{
cout<<"Devide=(override)"<<endl;
return*this;
}
Devide&operator=(constDevide&d)
...{
cout<<"Devide="<<endl;
return*this;
}
} ;
int _tmain( int argc,_TCHAR * argv[])
... {
DevidedObj1;
DevidedObj2;
/**//*BasebObj=dObj1;
Base&bObjRef=dObj1;*/
BasebObj;
Base&bObjRef=dObj1;
bObj=dObj2;
bObjRef=dObj2;
dObj2=dObj1;
return0;
}