May 2012
Intermediate to advanced
679 pages
16h 56m
English
Q. Can we pass objects as parameter to functions?
A. Yes by all means.
Q. When methods work with objects why use objects as parameter?
A. A method is tied to one particular object. What if we want to compare two objects?
In that case, you need at least one object as a parameter.
Q. What are the basic ways of passing object as a parameter?
A. Just the same as other data types. Passing by value and passing by reference.
Q. What are the two ways in which object can be passed by reference?
A. First the traditional way, i.e. using pointer. Second using new reference operator (&). We recommend the second one.
Read now
Unlock full access