Re: HW4


[ Follow Ups ] [ Post Followup ] [ CS1704 Discussion WWWBoard ] [ FAQ ]

Posted by hussein on July 10, 2000 at 18:51:02:

In Reply to: HW4 posted by Amy on July 10, 2000 at 17:40:37:

: It gives a value to name variable. Why it is passed by reference? Can I pass it by value? Like
: void SetName (string astring);

yes, you can pass it by value.

: What's the difference between these?

the difference is that for large objects you can avoid making extra copies (what the compiler does for value parameters) if you use a reference variable.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1704 Discussion WWWBoard ] [ FAQ ]