Click here to Skip to main content
15,891,789 members
Please Sign up or sign in to vote.
1.57/5 (6 votes)
See more:
Hello,
Please tell me difference between argument and parameter, Pointer and reference, shallow copy and deep copy, Default copy constructor and overloaded copy constructor.
Posted
Comments
Legor 17-Aug-11 9:44am    
Standard terms which are explained in dozens of sites.

 
Share this answer
 
Comments
Espen Harlinn 6-Oct-11 10:37am    
Nice links :)
Simon Bang Terkildsen 6-Oct-11 12:23pm    
Thank you, Espen
Buy a book, or learn how to use google.
 
Share this answer
 
Comments
CPallini 12-Aug-11 8:01am    
Clear, concise, correct: 5.
#realJSOP 22-Aug-11 13:51pm    
At least two people didn't think so.
An argument is usually a string passed into an exe.

A parameter of a function is copied on to the stack of a function when the function is called.

Pointer is a memory location which contains a memory location.

A reference is a pointer which is passed into a function. I.E. it cannot be changed

Shallow copy is a copy to the stack, I.E. out of scope the variable is destroyed.

Deep copy is a copy to allocated memory. I.E. has to be freed to be destroyed.

Default copy copies the class members but does not copy data which is pointed to by internal pointers.

Overloaded copy is a copy which you define so you can define its behaviour.

This is my understand of these terms.
Hope this helps you.
 
Share this answer
 
v3
Comments
Simon Bang Terkildsen 17-Aug-11 9:47am    
hmm a +1 and +2 vote seems a bit harsh to me, as SafarTimura gives a good summary for the question.
+5 from me
Guyverthree 17-Aug-11 9:54am    
Thanks. If the terms are wrong I will improve the answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900