Pass member object containing a Mat object to another member object

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

class A{

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

class B{
void move();
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.

Thanks, you guys. It is done.