why prefer pass-by-reference to pass-by-value??

View previous topic View next topic Go down

why prefer pass-by-reference to pass-by-value??

Post by ujjwal.khare on Mon May 12, 2008 4:36 pm

hiii
friends lets hv a discussion over this.
Thanks & Regards
Ujjwal Khare
Email : firstname dot lastname at cgi dot com

ujjwal.khare
Developer
Developer

Gender:MaleLibraRooster
Posts : 17
Joined : 08 May 2008
Age : 27
Location : Bangalore

Back to top Go down

Re: why prefer pass-by-reference to pass-by-value??

Post by balaraj on Tue May 13, 2008 9:19 am

I don't think call by reference is preferred over call by value. It all depends on the requirement of the usage.
When you need the value to be changed in the called function then use call by reference, else use call by value.
what say?

balaraj
VIP Member
VIP Member

CapricornSnake
Posts : 126
Joined : 25 Apr 2008
Age : 30
Location : Bangalore

Back to top Go down

Re: why prefer pass-by-reference to pass-by-value??

Post by ujjwal.khare on Tue May 13, 2008 11:05 am

This question is with respect to Cpp.
Thanks & Regards
Ujjwal Khare
Email : firstname dot lastname at cgi dot com

ujjwal.khare
Developer
Developer

Gender:MaleLibraRooster
Posts : 17
Joined : 08 May 2008
Age : 27
Location : Bangalore

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum