|
-
November 7th, 2003, 04:09 AM
#7
If you are just passing an object, using a reference is better in terms of readability. As from the perspective of efficiency, both are the same.
However, if you need to pass a pointer to an array of object, there is no choice but to use a pointer. This is because the address stored by the reference cannot be modified once after initialization.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|