still confused about call by reference

Nathan Reed nathaniel.reed at gmail.com
Wed Oct 31 17:33:19 PDT 2007


Hoenir wrote:
>> Object types in D are indeed reference types
>>
> http://www.digitalmars.com/d/1.0/struct.html tells the following:
> "Whereas classes are reference types, structs are value types."
> so would I have to use the & operator?

That gets you a pointer.  You don't need & to pass a value type to a 
'ref' parameter.


More information about the Digitalmars-d-learn mailing list