P
Peter Oliphant
I've been told that value structs can have default constructors (I'm using
VS C++.NET 2005 PRO using clr:/pure syntax). But the following code
generates the following error:
value struct ValueStruct
{
double x ;
double y ;
ValueStruct() { x = y = double(0) ; } // error *
} ;
* error C3417: ValueStruct::ValueStruct(void)' : value types cannot contain
user-defined special member functions
Was I misinformed, or am I doing something wrong in the above code?
[==P==]
VS C++.NET 2005 PRO using clr:/pure syntax). But the following code
generates the following error:
value struct ValueStruct
{
double x ;
double y ;
ValueStruct() { x = y = double(0) ; } // error *
} ;
* error C3417: ValueStruct::ValueStruct(void)' : value types cannot contain
user-defined special member functions
Was I misinformed, or am I doing something wrong in the above code?
[==P==]