I was looking for way to solve this small Boolean pointer references problem but cannot came to a solution. I know C++ becomes complex when it comes to usage of Pointers and references.
Below code fragments uses a flow like references of
bool* temp= nullptr;
temp2 = temp;
bool temp5 = true;
*temp3 = temp5;
std::cout << *temp <<std::endl;
You are assigning value to a
nullptr. That is what is causing segmentation fault
Just replace line
bool* temp = nullptr;
bool* temp= new bool;
It will work now.
And don't forger to delete it with