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])
{
Type: Posts; User: DenJansen
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])
{
Ah crap. I've been up way too long.
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...
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.
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...
/facepalm
Derp. I'm trying to output two values in a single function. Turned highcard into a pointer and now it works. Nevermind.
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...
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!
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.
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...
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...
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
/facepalm
Durr. Sorry, it's been a few months since I wrote code.
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...