Declare reference to variable ?

yaz yazan.dabain at gmail.com
Mon Jul 29 23:32:19 PDT 2013


You don't need to use dereference operator. Example:
http://dpaste.dzfl.pl/d34c23e5

import std.stdio;
struct Foo {
   void answer() {
     writeln("As you wish!");
   }
}

void main() {
   Foo veryVeryLongNamedStruct;
   auto v = &veryVeryLongNamedStruct;
   v.answer();
}


More information about the Digitalmars-d-learn mailing list