extracting cards in c++