Creating an assigning an object in c++
<p>Hello I am new to c++,</p>

<p>I can create an new instance of an class using <code>Example example("123")</code></p>

<p>I have two question </p>

<ol>
<li><p>I know we cannot check if the object is null like <code>if(example ==NULL)</code> because this is not an pointer do we have any other way to do that.</p></li>
<li><p>I have a method to return the object like: How can i return a null?</p>

<pre><code>Example get_Example() {
    if (example.getName().empty() {
        Example example("345");
        return example;
    }
    return NULL // i cannot return null.
}
</code></pre></li>
</ol>

<p>Can I do something like this?</p>

<pre><code>Example get_Example() {
    Example example;
    if (example.getName().empty() {
        example = Example example("345"); 
        return example;
    }
    return NULL // i cannot return null. How 
}
</code></pre>

<p><code>example = Example example("345");</code> I know this is stupid But how can i do that without pointer.</p>
