I want to compare the actual object stored in the vector. I was wondering if this is comparing the address or the value of the object in the vector. The > operator has been overloaded for this object.
selectedHandB and selectedHandA are pointers
1 2 3 4
if((&selectedHandB)[0] > (&selectedHandA)[0])
{
std::cout << " B > A " << std::endl;
}
My apologies if adding () made it too difficult for you to read. It's easier for me to visually see it this way.
And I want to use references but I have a structure of pointers (to vectors) of objects (class) to determine who goes first and in what order. They then decide which cards they want. Line 3 was irrelevant. It was just to check to see if the address or element was being compared. It was in fact the element but i was curious why it isn't a *.