iam trying to program a copy constructor that is able to create a bitwise
copy of its argument:
MyClass
{
int a;
// lots of different fields goes here
float x;
MyClass (MyClass my)
{
// create an exact copy of mc here
}
}
normaly, object.MemberWi seClone() would be the way to go but it seems its
useless within a constructor.
is there another way (without copying every item manually)?
--
cody
Freeware Tools, Games and Humour
[noncommercial and no fucking ads]
copy of its argument:
MyClass
{
int a;
// lots of different fields goes here
float x;
MyClass (MyClass my)
{
// create an exact copy of mc here
}
}
normaly, object.MemberWi seClone() would be the way to go but it seems its
useless within a constructor.
is there another way (without copying every item manually)?
--
cody
Freeware Tools, Games and Humour
[noncommercial and no fucking ads]
Comment