I've been looking over some code in C++ and came across an object being the boolean conditional for an if statement. This is confusing to me as it does not seem to fulfill the true/false criteria needed for if statements. I could understand if the statement was checking for null but the follow code does not make sense to me.
if(!mObject)
{
mObject = new Object();
}
Can someone explain why you can do this?
BTW, the code works when it is run.