November 24th, 2009, 12:25 PM
My new GoFish thread.
Well... long story short I had another thread about a month ago ? maybe a little later.. I went through the design process like.. 10 times and now I think I finally have my final design pretty pat..
I'm only having one simple issue.. I have a class Card that holds and int Face(1 ace, 2 two, 13 king) and int Suit (1 heart, 4 spade). Player hands are a list of card objects, same goes for the deck..
I want to pushback a copy of a card from the deck, and put it into my hand..
list <Card> Contents..
list <Card> Hand
It seems to work for one iteration but .. only one...
list <Card>::iterator i = Deck.Contents.begin();
**** iterate through list *****
Does anyone have any ideas? I've looked everywhere...
I tried allocating a new card new Card (suit, face) and trying to copy it over insert..
but I'm a little lost...
edited to add source.
Last edited by exiledgolem; November 24th, 2009 at 12:28 PM.
Reason: added source...
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!