str is a local variable. It is destroyed after the function returns.
You need to either make str static or dynamically allocate memory and return the pointer, just remember to delete[] it.
|
Results 1 to 2 of 2
Thread: return string from functionThreaded View
|
Click Here to Expand Forum to Full Width |