yeah for some reason my compilier lets it compile with warnings just not errors.
any thoughts on my segmentation fault?
Type: Posts; User: gloworm
yeah for some reason my compilier lets it compile with warnings just not errors.
any thoughts on my segmentation fault?
i fixed that but check out my new code and my segmentation fault. Where is my issue???
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#define DECKSIZE 52
#define VALUE 9
#define FACE 4
#define TRUE
#define FALSE
and here is my code so far, the only problem is my syntax is all messed up and i cant figure out the orientation of them, please help!!!
#include<stdio.h>
#include<string.h>
#include<stdlib.h>...
why am i getting this error with this snippet?:
error: warning: passing argument 2 of âstrcpyâ from incompatible pointer type
int main(){
int suitCount=0;
int faceCount=0;
...
thank you will do
here is my code:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#define DECKSIZE 52
#define VALUE 9
#define FACE 4
how do i delete them?
sorry im just lost and have no one to help. I have the books but im trying to learn on my own so i thought that people in these forums would be helpful. Sorry for all the questions but im just...
so i need to initialize like: P_hand[] D_hand[]? and i need to put these as a define statement yes?
please know that i am really nieve. so this is what i added:
int P_hand[6], D_hand[6];...
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#define DECKSIZE 52
#define VALUE 9
#define FACE 4
typedef struct {
int value;
P_hand and D_hand are supposed to be used just to identify the dealers and players hand but i was hoping to assign the total values of each hand to just those prototypes and use just those to start...
my code is posted so let me know where i need to go from there. you can see where im stuck cause all its doing now is printing out the random cards but i still need it to total the value of the...
i posted my code so far but im really having questions on how i can assign the value of the cards printed and use that total to determine whether or not to hit or stand and to identify bust,...
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#define DECKSIZE 52
#define VALUE 9
#define FACE 4
typedef struct {
int value;
your right got it but now i need to make sure that my cards are being asigned the right value and add those together, store that value, and then assign that value to my players hand: P_hand and my...
i guess my question is because i assigned values to the cards originally, when i print them out at the bottom how can i find out the total between those two cards and if it is still storing them. and...
i did update the code and you were right i wasnt shuffling enough so now i am getting random cards and thats great and i see what that code was doing only shuffling ten cards increased the chances of...
why is it that when i try to print out my cards my shuffle function is not changing the arrangement of my DECKSIZE array? more specifically the array cards[1] is the same for each print out....
...
i did that and yes it printed out the parts of the array but for some odd reason the shuffle function is not changing the arrangment of my arrays so cards[1].name is not changing when it prints out...
lol OMG i cant believe how easy that was. Like i said im new. And for some odd reason im making everything harder than it is but i have my code posted now so someone should check it out and HELP...
so i am very new to this. I have such an inpartial code. I have no idea how to print out the hands for the player and the dealer, they are supposed to be random but i am just lost can anyone help...
it is like a dos box and im so used to windows that copying and pasting just isnt as easy. i can highlight my code and right click the mouse and it copies the highlighted part to the area of where...
im writing code in a gcc compliler under a putty server i believe its called onyx. i have been needing help with my code and it would be so much easier if someone can tell me how to copy my code from...
is there any way to copy my code from ONYX and paste to windows so i can show you the whole code?