why prefer pass-by-reference to pass-by-value??
2 posters
Shutdown :: Technical Discussions :: Need Help! :: C/C++
Page 1 of 1
why prefer pass-by-reference to pass-by-value??
hiii
friends lets hv a discussion over this.
friends lets hv a discussion over this.
ujjwal.khare- Developer
-
Number of posts : 15
Age : 42
Location : Bangalore
Registration date : 2008-05-08
Re: why prefer pass-by-reference to pass-by-value??
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?
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
- Number of posts : 90
Age : 46
Location : Bangalore
Registration date : 2008-04-25
Re: why prefer pass-by-reference to pass-by-value??
This question is with respect to Cpp.
ujjwal.khare- Developer
-
Number of posts : 15
Age : 42
Location : Bangalore
Registration date : 2008-05-08
Shutdown :: Technical Discussions :: Need Help! :: C/C++
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum