Thank you both for replying to me! :-)
See this is why I am confused I've tried using both || and && but neither work. I've ended up leaving the code as:
}while( TTTboard[i]!=EMPTY &&...
Type: Posts; User: melodia
Thank you both for replying to me! :-)
See this is why I am confused I've tried using both || and && but neither work. I've ended up leaving the code as:
}while( TTTboard[i]!=EMPTY &&...
I've tried all three ways and still the user can override any memory location in the array even if it already has an 'o' or 'x' in it. I cannot figure out why this loop control doesn't work. Help...
Thank you rags_to_riches
Exactly! I was wondering the same thing, they can't be the same, I thought about that but wasn't sure how I can make that work. Can I say:
...
Quzah,
Thanks for the reply! I'm just not sure how that would effect the function, could you clarify?
-melodia
I'm not sure I understand how that is wrong? Doesn't it mean the same thing? Changing it to that wouldn't change the program when you compile it would it?
min=<value<=max is what i essentially...
Hi I'm just wondering if anyone can tell me if there is something wrong with the way I am using the do while loop in my function GetIntInput().
This is a part of my program for tic tac toe. It...
Thank you so much! It seems like its always something small that I repeatedly miss! I really appreciate it!
/*******************************************************************************
********************************************************************************...
Is this a valid do while loop?My program doesn't end when there is a match of three x's or 3 o's. I'm using a one dimensional array to store the values for the user and computers x's and o's for a...
Thank you! Sorry for the late reply. I figured out my issue and accidently forgot I posted this!
I really appreciate the insight though! :-)
Hi there, I'm having two problems debugging my program I was wondering if anyone has any time for some input. It's a tic-tac-toe program and I'm having an odd issue with the third entry from the...
By (double) rand() you are simply casting the value rand generated. I'm not sure why i even posted this, sorry it must be the end of the day.
Hi, I'm just wondering a few key things about rand(). By default rand() generates integer values but can you cast it to generate a double? For example if one wants to generate a random double between...
Hi,
I'm working on a tic-tac-toe program and one of my modules needs to take an integer value from the user and confirm it was valid integer input and print an error message if it is wrong and...
Thank you Adak for replying to my post. I'm still having ridiculous troubles with this program. I've tried what feels like a million different loop structures and still it doesn't work. I don't want...
Hi Everyone,
I'm writing a blackjack game for c and my users turn works fine. The array I made has an index of 52. I'm "shuffling" the deck with srand and everything seems to work other than the...
Thank you for the reply, I managed to fix the while loop at the top but now the ridiculous thing has a problem with the switch statement for "scoring the card"
int Score_Card(int card)
{
...
The only errors I am getting when compiling are in this function:
int Users_Turn(int deck[])
{
int card;
int totalscore=0;
int score;
int choice;
do
/* function prototypes */
void clean (void);
char GetTestChoice();
void Initialize_Deck(int deck[]);
int Random_Number();
void Shuffle_Deck(int deck[]);
int Draw_One_Card(int deck[]);
void...
Hi,
I'm writing a program for blackjack and am using an array with and index of 53 the first 52 spaces are for the cards and the 53rd is for keeping track of how many cards are left in the...
Sorry, the second part I incorrectly explained, display card is void because it simply prints to the screen the cards suit and it's rank. Draw_One_Card is supposed to pass the 'card' to both...
Thank you so much! For some reason(maybe I've been staring at this for way too long) my head couldn't wrap it's way around this! I really really appreciate it!
-Melodia
Hi everyone,
So this is kind of a broad question , but my textbook is pretty terrible at explaining some fundamental things about modular programming. I'm writing a blackjack program and I have...
thanks for the input!
I'm still fighting with this function. I'll figure it out though, stubborness usually pays off ;-)
Thank you!
now to figure out the rest :-D