Well there are several possible errors you have here:
class2 x = new class1;
did you mean: ???
And this code only will work, if class1 is derived from class2.
class2* x = new class1;
Changing a value in a base class is only possible if the member is public or protected. Both is considered bad practice and best avoided. You can provide public/protected getter/setters, though, with the help of which you can do the intended changes.
Is that what you need? If not, probably you postsome of you code, indicating where your error occurs.
void set(bool b)
m_bool = b;
class Derived : public Base
set(false); // this sets the value of the Base class to false
/// in your main
Base* pBase = new Derived;
pBase->someFunc(); // call the set method of Base indirectly though someFunc