Need help with homework program
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Need help with homework program

  1. #1
    Join Date
    Feb 2009

    Need help with homework program

    Ok the program is supposed to deal 5 cards out to 4 players. I'm just beginning so try to keep that in mind when giving advice that things like 2D arrays which would be extremely useful in this scenario are not an option. So I first filled an array with 0-51 to make the deck. I then shuffled the deck and handed it out to the 4 players. Now I have some numbers printed out as cards in the players hand. I need to make it so those numbers are somehow changed to suits/and numbered cards. To do this I play to use card[n]/13 to give me 0,1,2,3 then each of those numbers will signify a suit. Then do (card[n]%13)+1 to determine what card it is...(1=ace, 11=Jack, 12 = Queen, 13 = King). The problem I am having is implementing this into the program. If someone could point me in the direction I would be very appreciative.

    This is the source
    Last edited by Sean123; February 24th, 2009 at 07:25 PM.

  2. #2
    Join Date
    Jan 2008

    Re: Need help with homework program

    Please be precise in asking questions.

    Read this:
    Rate the posts which you find useful

Tags for this Thread

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

This is a survey!

HTML5 Development Center