Appretiate some coursework help related to classes.
All im trying to do is compare the elements of two objects
if(asteroid1.getxx == asteroid2.getxx && asteroid1.getyy == asteroid2.getyy)
{
cout<<endl;
cout<<"Collision"<<endl;
}
All i want to be able to do, is to compare the x and y co-ordinates of my two objects. The intelisense is working and there doesnt seem to by anything wrong other then just lack of knowledge.
so.....what stupid mistake am i making?
Also...second question to field, if i was to move this and just make a comparason function, could i send the object and its elements to another cpp?
*Clarify* passing the co-ordinates of both objects to a function, in the cpp with all my class details.
Help appretiated and thank you!