P
Pep
I have a method in a class like this
class myClass
{
... ctros, dtor, etc ...
string myClassMethod()
{
string myString = "";
... more code ....
myString = "new value";
return(myString);
}
};
So my question is, is this safe or will the returned string go missing
when execution goes out of scope, in which case I would be better of
passing back a string pointer in the form of a auto_ptr?
TIA,
Pep.
class myClass
{
... ctros, dtor, etc ...
string myClassMethod()
{
string myString = "";
... more code ....
myString = "new value";
return(myString);
}
};
So my question is, is this safe or will the returned string go missing
when execution goes out of scope, in which case I would be better of
passing back a string pointer in the form of a auto_ptr?
TIA,
Pep.