Defining member fuctions of a class or struct out side of the class/struct body?

Jamal via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 13 11:41:16 PDT 2016


Warning D newb here.

Is it possible to define a member function outside of the 
class/struct like in C++;

class x { body
     void foo(int* i);
};

void x::foo(int* i){
     *i++;
}

Or is it just D-like to define everything inside the class/struct 
body?


More information about the Digitalmars-d-learn mailing list