Scope operator like in C++?
TimK
qwesxrfvzgb at web.de
Tue Mar 23 03:41:36 PDT 2010
Hi!
I have a little (private) project in C++ and was thinking that I should give D
a chance (especially since it's not exactly new).
So I have a class TPerson where the declaration is in the header file and the
definition in the cpp-source file. Naturally a defined function looks
something like this:
void TCharacter::DoSomething(int x){...}
I do this for several reasons:
- The class would get really awkward to read through and understand, with all
the code in it - so I usually just put the declaration and the documentation
for public functions into it.
- a programmer who just wants to understand the class doesn't care about the
implementation.
Now I tried to make a class in D, too, following this style.
Unfortunately that doesn't work and I couldn't find a working alternative in
the documentation.
Is this not possible in D?
(I'm using GDC, so I guess it's still D 1.0)
Regards,
Tim
More information about the Digitalmars-d
mailing list