Declare reference to variable ?
Temtaime
temtaime at gmail.com
Mon Jul 29 14:13:51 PDT 2013
I have a long named variable in a struct.
For example let's name that longnamedstruct.longnamedmember
I need to use that variable in many places of the code and i
cannot create the copy of it.
In c++ i can
auto &v = longnamedstruct.longnamedmember;
Now i can use v anywhere.
Why i cannot declare reference in D ? Or can i ?
I can make pointer to that, but it is workaround and it's need to
use variable dereferencing by * operator.
More information about the Digitalmars-d-learn
mailing list