and i have an overloaded addition operator that looks like this:
1 2 3 4 5 6 7 8 9
Vect Vect :: operator+(const Vect &rightVect)
{
Vect temp;
temp.x=rightVect.getX()+x;//why does this have direct acces?
temp.y=rightVect.getY()+y;
temp.setX(&temp.x);
temp.setY(&temp.y);
return temp;
}
and if i add a vect instance that was created with ether the second or third constructor they add just fine but if i try to add ether of them with the first constructor it returns this vect_test.cpp no match for 'operator+' in 'test1 + test2' any ideas what might be causing it?
1 2 3 4 5 6 7
Vect test2();
Vect test0(2.0,3.0,'r');
Vect test1(2.0,1.0,'r');
Vect test3(0,0,'r');
test3=test1+test0;//this works
//test2=test1+test2;//this doesnt work