Returning object as null returns what?
<p>I have a class and a function that returns an object of that class, if i return NULL what exactly gets returned?</p>

<p>Example:</p>

<pre><code>class someclass {
    int a;
    int b;
    someclass::someclass(int a, int b) {
        this-&gt;a = a; this-&gt;b = b;
    }
};

someclass functionname() {
    return NULL;
}

someclass foo = functionname();
</code></pre>

<p>Since I dont have a default constructor for the class what gets returned? Is it an actual usable object? Or just gibberish? Why cant I check like this?</p>

<pre><code>if (foo == NULL) {
    something
}
</code></pre>
