Search:

Type: Posts; User: DenJansen

Search: Search took 0.01 seconds.

  1. Okay, I rewrote all the arrays so they start at...

    Okay, I rewrote all the arrays so they start at zero, but I'm still getting the same error.

    New poker.c:

    #include "poker.h"

    /* shuffle cards in deck */

    void shuffle (int wDeck[][13])
    {
  2. Ah crap. I've been up way too long.

    Ah crap. I've been up way too long.
  3. Unfortunately not (it serves a different purpose...

    Unfortunately not (it serves a different purpose than you think...I haven't had a chance to add all my notes yet), but thanks for mentioning that. I noticed that part was coded wrong for another...
  4. I just checked that, and that doesn't seem to be...

    I just checked that, and that doesn't seem to be where the problem is. card is just an integer value inserted into the 4x13 array wDeck.
  5. Unhandled exception at 0x66df984f (msvcr90d.dll).

    I just spent a lot of time on this program, and suddenly it's not working. I evaluate it in Microsoft Visual Studio, and there are no errors or warnings, but when I to Debug it, it always either...
  6. Replies
    1
    Views
    2,996

    /facepalm Derp. I'm trying to output two...

    /facepalm

    Derp. I'm trying to output two values in a single function. Turned highcard into a pointer and now it works. Nevermind.
  7. Replies
    1
    Views
    2,996

    Poker Program

    This one is really vexing me. I'm writing a rudimentary poker program, and I created this function that, as far as I can tell, should work. It's designed to evaluate a 2x5 array called wHand--where...
  8. Bingo, that was it. Somehow I ended up changing...

    Bingo, that was it. Somehow I ended up changing those between the original and the new files. I don't even remember doing that.

    Thanks!
  9. I ran the sample main.c in Visual Studio and it...

    I ran the sample main.c in Visual Studio and it ran error free, so I think the original is coded right; it's just whatever I'm trying to do to it that's failing.
  10. Whoa. The clean-build gave me a whole different...

    Whoa. The clean-build gave me a whole different set of errors. For lines 7 and 10 in main, that is:

    const char suit[4] = {"Hearts", "Diamonds", "Clubs", "Spades"};

    /* initialize face array...
  11. error LNK2005:_**** already defined in main.obj

    So I have this sample main.c file:

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>

    void shuffle (int wDeck[][13]);
    void deal (const int wDeck[][13], const char *wFace[], const char...
  12. Replies
    4
    Views
    989

    Thanks, bernt! That hint was exactly what I...

    Thanks, bernt! That hint was exactly what I needed. Converted the integer values to double values, and now the program works like a champ! :D
  13. Replies
    4
    Views
    989

    /facepalm Durr. Sorry, it's been a few months...

    /facepalm

    Durr. Sorry, it's been a few months since I wrote code.
  14. Replies
    4
    Views
    989

    Dividing stats in C

    I'm trying to create a statistic showing a percentage by dividing two other statistics, but the code I've tried doesn't seem to work. The relevant code is below. The line giving me the problem is...
Results 1 to 14 of 14