//declaration of member variable in class A: bool *var; //function in class A: void f (bool *var) { this->var = var;} //another funciton in class A where i want to alter var: void funct (){ this->var = false; } //in main: bool var; A.f(var);