www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - struct S, this = S.init

In a struct you can go

struct A {
   int a = 5;
   int b = 1;
   void foo()
   {
     *this = A.init;
   }
}

which sets all struct member variables to their init values.
is there any way to do something similar with a class?
or an array?

Regan.

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 14 2004