CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 26

Threaded View

  1. #1
    Join Date
    Oct 2009

    Talking 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..

    list <Card> Contents..
    list <Card> Hand
    I want to pushback a copy of a card from the deck, and put it into my hand..
    list <Card>::iterator i = Deck.Contents.begin();
    **** iterate through list *****
    It seems to work for one iteration but .. only one...
    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.
    Attached Files Attached Files
    Last edited by exiledgolem; November 24th, 2009 at 11:28 AM. Reason: added source...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)