A quick explanation of what I'm doing might help to answer this question. I have a Card class, and a CardPile class. The CardPile class has a vector of Card*'s, and I'm trying to write a sort method to sort the pile(in ascending order). My Card class has the operator<,operator>,operator<=,operator>=, and operator== methods defined. My problem is that the vector holds pointers, and I don't want it to compare the pointers, but the actual cards themselves. Is there a way to somehow get the sort method to dereference the iterators that it takes and use my operator methods on the cards instead of the pointers??