Yeah you can. If you read my first post completely. If you have two cards that are the same value in one hand, I'm throwing those two cards out of the game. If both players run out at the same time...
Type: Posts; User: surefire
Yeah you can. If you read my first post completely. If you have two cards that are the same value in one hand, I'm throwing those two cards out of the game. If both players run out at the same time...
Here's what I think he is referring to as a tie game. As you can see, they both run out of cards at the same time but it says player 2 wins.
Five of Hearts = Five of Clubs ...
It's for a class assignment. I'm actually redoing the program because the instructor took off 10% for not catching a time game. So apparently it is possible. He's not a very good teacher, when you...
I'm not talking about an instance of a tie between card versus card. I have the program completely running and working. The problem is, every so often, there will be a game that never ends because...
Basically, the program deals 52 cards between 2 players. Each time you run the game it usually takes between 50 - 350 hands for the game to complete.
Sometimes, you'll get a game where the 2...
I'm working on an enigma machine simulator. I'd supposed to do a #define for each one of the rotors and reflectors. How do you do a #define for a char string? I have the program partially functional...
Awesome, didn't realize that was an option. Thanks!
I'm working on a regex parser that sifts through an input file and matches a student's name to their grade.
char name[BUF_SIZE];
sprintf(name,argv[2]); /*copy netid into name */...
I'm trying to take an input file like this:
+ LAST, FIRST M. | fmlast
: quiz | 50
: program | 100
- fmlast | 29
- fmlast | -10 no block comments | -20 improper memory use
Ok, here's how I solved the close when a user types quit problem for future reference:
do
{
read(io_sd1, buf1, sizeof(buf1));
bytes = sprintf ( buf1, buf1);
write( io_sd2,...
Would using strstr work for this?
Yeah. How do I perform that check? Basically if buf1 or buf2 are "quit\n" it needs to exit out of the loop or just close the connections.
Thanks.
Hey guys, found the forums while searching for anything to help me with my current homework assignment in my C class. This is my 3rd programming class, the previous 2 being in C++ and this in C. I've...