what could be analogue code for following code snippet
class A
{
};
I have above class, now I create one object pointer for it and one object for it.
A* a;
A aobj;
I want an analogue code for if statement below using aobj( A’s object).
if(a)
{
}
Presumably A has a constructor that initializes its members. You could add an
member that just check if members are at default values. Eg