Hi Brethrem,
am kind of new in the C++ world, so far am learning about functions but am stuck on the difference between call a function by reference and call it by value.
I will appreciate your help
GOMEZ_1
12
Newbie Poster
Recommended Answers
Jump to PostI think you mean passing variables by reference or by value when you call the function. The difference is basically what effect you can have on the variable.
By value means that the variable passed into the function is a copy of the original variable and any changes made to …
Jump to PostWhether to pass parameters by reference or value largely depends on the type of data you're passing to a function.
Passing by reference is more efficient for complex types. Instead of copying the whole object, you need only pass a reference or pointer to the object, which is typically 32 …
All 7 Replies
tinstaafl
1,176
Posting Maven
GOMEZ_1
12
Newbie Poster
GOMEZ_1
12
Newbie Poster
LaxLoafer
71
Posting Whiz in Training
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
GOMEZ_1
12
Newbie Poster
rubberman
commented:
De nada! :-)
+12
melissad
-4
Newbie Poster
LaxLoafer
commented:
Please refrain from posting content taken from other sites for your answers.
-1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.