T
Thomas Baier
Hi there,
I've got a class with an method that creates a temporary object of its own
class and then copies this objekt into the this pointer like
class myclass {
protected:
//...
public:
//...
void function() {
temp = myclass;
//do something with temp...
*this = temp; //this line produces no error by the compiler
//but in fact temp and this aren't the same
}
};
So could anybody tell me where to find my mistake?
Thanks for help
Thomas
I've got a class with an method that creates a temporary object of its own
class and then copies this objekt into the this pointer like
class myclass {
protected:
//...
public:
//...
void function() {
temp = myclass;
//do something with temp...
*this = temp; //this line produces no error by the compiler
//but in fact temp and this aren't the same
}
};
So could anybody tell me where to find my mistake?
Thanks for help
Thomas