#include "BaseClass.h"
struct ST
{
int a;
char c;
};
class Derived : Base{
public:
Derived(int newx, int newy);
Derived& operator=(const Derived& rhs);
private:
int x;
int y;
ST myStructure;
};
Derived& Derived::operator=(const Derived& rightValue)
{
if(this == &rightValue){
return *this;
}
x = rightValue.x;
y = rightValue.y;
myStructure.a = rightValue.myStructure.a;
myStructure.c = rightValue.myStructure.c;
return *this;
}
|
|