Pass member object containing a Mat object to another member object

Hello,
I simply want to pass a member object into another member object, which could be illustrated as

class A{

 private:
    cv::Mat moA
    int a;
    cv::Rect2d moRA 
// some others
}

class B{
public:
void move();
private:
A oa1, ob1;
}

What I want to do is oa1 = ob1 in move() of class B, but it failed as ob1 changed. I have tried
A oa1(ob1) but not working

I see no relation to OpenCV. that looks like a general C++ question. if that is the case, please find a forum for general C++ questions.

https://www.google.com/search?q=c%2B%2B+rule+of+three

Thanks, you guys. It is done.