S
Surendra Singhi
Hello,
Say I have a function 'func1', which calls an internal function int_func1,
which returns a reference to an object.
Now this object contains a string, is it safe for my function 'func1' to
return a pointer to this string, or should I copy the string somewhere else
and then return a pointer to the string?
Thanks.
--
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html
,----
| By all means marry; if you get a good wife, you'll be happy. If you
| get a bad one, you'll become a philosopher.
| -- Socrates
`----
Say I have a function 'func1', which calls an internal function int_func1,
which returns a reference to an object.
Now this object contains a string, is it safe for my function 'func1' to
return a pointer to this string, or should I copy the string somewhere else
and then return a pointer to the string?
Thanks.
--
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html
,----
| By all means marry; if you get a good wife, you'll be happy. If you
| get a bad one, you'll become a philosopher.
| -- Socrates
`----