July 15, 2004 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/
|
Copyright © 1999-2021 by the D Language Foundation