Quote Originally Posted by vkash View Post
thanks to paul and GCDEF for giving me information about exception and how to use them.
BUT I have still problem when data is returned by reference I have studied both return by reference and return by value(a month ago) usually return by value is used. Can you please refresh my memory on what is difference in these two returning methods.
If you return a reference to something, it has to exist after the function exits. That's why you can't return a reference to a variable declared in the function because it goes out of scope when the function ends.

Paul explained it in post 18

http://www.codeguru.com/forum/showpo...9&postcount=18