Creating object pointers in C++
<p>I'm trying to create an object which I want to populate inside a switch-case, but it's out of my knowledge scope.</p>

<p>I have these constructors:</p>

<pre><code>cObj::cObj()
{
}

cObj::cObj(std::string filename)
{
    //...
}
</code></pre>

<p>So, basically I want to call following method, create a pointer to the object, and populate it inside of my switch-case:</p>

<pre><code>void someThing() {
    cObj myObj();

    switch (someValue)
        case 0:
            myObj("/some/path");
            break;
        ...
}
</code></pre>

<p>I assume my constructor is wrong since it does not really work.</p>

<p>How can I accomplish this?</p>
