T
tttpppggg
Hi.
I am just sharpening up some code, getting operators going,
but have bumped into a hurdle around applying operators to the
following line of code:
s1 = s1 + s1;
where s1 is a class containing a pointer array of doubles.
I'm finding it difficult to plug a memory leak.
Has anyone been here before?
Any help will be appreciated.
The sum operation isn't the real problem; the product is.
The product requires prezeroing its destination(return value).
Even if you can only explain why I shouldn't attempt this in my own
home I will be gratefull.
It may be that my most practical solution is to abandon the use of
class references and go straight to pointers.
The product requires allocation. I've tried with and without an =
operator.
The copy constructor does take over the assignment, or at least the
code compiles. Oops, that might be it. My copy constructor is not doing
it, but an automatic one is. Well, I'll check this out but I doubt that
it is the problem.
Gee, thanks a lot for being here.
-Tim
I am just sharpening up some code, getting operators going,
but have bumped into a hurdle around applying operators to the
following line of code:
s1 = s1 + s1;
where s1 is a class containing a pointer array of doubles.
I'm finding it difficult to plug a memory leak.
Has anyone been here before?
Any help will be appreciated.
The sum operation isn't the real problem; the product is.
The product requires prezeroing its destination(return value).
Even if you can only explain why I shouldn't attempt this in my own
home I will be gratefull.
It may be that my most practical solution is to abandon the use of
class references and go straight to pointers.
The product requires allocation. I've tried with and without an =
operator.
The copy constructor does take over the assignment, or at least the
code compiles. Oops, that might be it. My copy constructor is not doing
it, but an automatic one is. Well, I'll check this out but I doubt that
it is the problem.
Gee, thanks a lot for being here.
-Tim