Hi,
I have a boolean varible set to true.When I attempt to set it to false from within a function the change isnt passed back to the varible.
If I change the varible to an int,and the function to return an int it works.The compiler doesnt raise any errors,so the syntax is ok..
Is it just that you cant pass boolean varibles by reference?Code:
bool reDeal=true;
bool anotherGo(bool &reDeal)
{
reDeal=false;
return reDeal;
}
Regards