I'm trying to create an object which I want to populate inside a switch-case, but it's out of my knowledge scope.
I have these constructors:
cObj::cObj()
{
}
cObj::cObj(std::string filename)
{
//...
}
So, basically I want to call following method, create a pointer to the object, and populate it inside of my switch-case:
void someThing() {
cObj myObj();
switch (someValue)
case 0:
myObj("/some/path");
break;
...
}
I assume my constructor is wrong since it does not really work.
How can I accomplish this?