if i have two objects,in this case cards, each storing a short value that can be accessed by a getvalue() method and i want to apply an int beat(cards c) function to them to see which has a higher value, how do i access the card i want to compare the parameter against. eg:
cards c1 = deck[15]; //Getting a card from an array of consturcted cards
cards c2 = deck[38];
if(c1.beats(c2)) cout << "BEATS";
I know how i can get at c2 but don't know how i can get the value of c1.
Thanks again
cards c1 = deck[15]; //Getting a card from an array of consturcted cards
cards c2 = deck[38];
if(c1.beats(c2)) cout << "BEATS";
I know how i can get at c2 but don't know how i can get the value of c1.
Thanks again