I have a scene class with member variables Image **images, int * xcoords, int * ycoords. Now, I'm trying to overload my = operator.
I get the following memory errors (using valgrind)
Conditional jump or move depends on uninitialised value(s)
==6439== at 0x406FCA: Scene::drawscene() const (scene.cpp:160)
==6439== by 0x4084C1: main (testscene.cpp:50)
And the line in question from above (scene.cpp:160) is
if (images[i]!=NULL)
So theyre saying that images was not initialized.
And so anywhere else drawscene() was called did not cause any problems, but I think because the = operator was used, it caused a problem.
Can anyone see any problems in my code that could cause this error?