Hi, and thanks for your reply.. But I'm very very very confused about C programming. I always seem to confuse everything.. So I don't know how to combine these 3 arrays so I can use them.
That is why I wanted to use only one array, but I think I'm making it harder myself.
Also, I don't know how to randomise my 52 cards so that I don't get any duplicates. Ex: I can have Ace four times, Diamonds 13 times, but not twice of an Ace of Diamonds!...
User Profile
Collapse
-
Array of strings in C?
Hi.. I need to know how to assign a value to each string in my array, if that can be done. I initialised a deck of cards by using
char *deck[52] = { "Ace of Hearts", "Two of Hearts, ........., "King of Spades" };
and now I need to find a way of assigning a value to each string so I can use them for calculation (I'm writing a simple Blackjack game in C, and I need the values of each card to calculate...
No activity results to display
Show More
Leave a comment: