Possible Duplicate:
how to “return an object” in C++
Let there be a function func_foo that can do some computation on a given set of data and after crunching some numbers, comes up with a result that needs to be given back to the caller. Is there any reward (performance wise) in passing the pointer to result variable and it getting modified in the function vs. the function returning the value - other than the convenience/practicality with Char* and structures type results.
I did a preliminary search for this query prior to posting the question and couldn't find anything related. If a relevant discussion exists please do point me to it.