356 Posted Topics

Member Avatar for riahc3

Is there a good webpage that explains how to use rand() and srand() correctly? Overall I need to learn how to generate a number between 0 and 3.

Member Avatar for Narue
0
222
Member Avatar for riahc3

Hey I have this code: [CODE] void menu() { char opt do { system ("cls"); printf ("1 - Option 1"); printf ("2 - Option 2"); printf ("3 - Option 3"); [B]scanf ("%c",&opt);[/B] [B]}while ((opt!="1") && (opt!="2") && (opt!="3"));[/B] [/CODE] The lines in bold are the ones Im not sure about. …

Member Avatar for riahc3
0
159
Member Avatar for riahc3

Hey I have to make the game War (card game: [url]http://en.wikipedia.org/wiki/War_(card_game)[/url] ) in C. Im not sure where (how...) to start. My basic thoughts/ideas/etc: Its a 40 (4 times 10) card version with 2 players. A way to do it would be set up a structure with 4 faces values: …

Member Avatar for jephthah
0
138
Member Avatar for riahc3

Hey :) Damn I hate pointers in C :P Worse thing possible. Anything I post my code: main.c [code] #include <assert.h> #include <ctype.h> #include <errno.h> #include <float.h> #include <iso646.h> #include <limits.h> #include <locale.h> #include <math.h> #include <setjmp.h> #include <signal.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include …

Member Avatar for Ancient Dragon
0
116
Member Avatar for riahc3
Member Avatar for riahc3

Hey everyone. Glad to become part of this community and I hope I continue to come here for a long time seeing as this site gives great helps. My problem: I have a struct that is (for example) the following: [code] #define NUM 999 struct client { int id; char …

Member Avatar for Clockowl
0
181

The End.