what's that suppose to mean?
Type: Posts; User: jarvis
what's that suppose to mean?
i originally declared it as
char cNum;
//but then i changed it to:
char *cNum;
//then there are no more syntax errors
i really think i'm getting close in solving this now..
i really don't know what u meant by breakpoint but anyway, here is the code"
fgets(cNum, sizeof(cNum), pFile); //line 1005
...
void loadDictionary(structWord aWords[], int nWordNumber, FILE *pFile)
{
int i, nChoice, j, k;
char *p, temp[BUFSIZ];
string50 strTemp;
for(i = 0; i < nWordNumber;...
thanx a lot! i'll try to understand the code you gave!thanx again!
what i'm trying to basically do is copy a txt file to the memory but it's not working and i aint sure why..pls help me. thanx a lot.
here is my struct:
typedef char string7[8];
typedef char...
by the way, thanks for all the peepz helping me out here..
here's the segment of the program i'm trying to do..
scanf ("%c", &cAction);
if (cAction=='H' || cAction=='h') //if hte player...
i'm sorry for the first one, forgot the & in there, yes i tried to compile it but the program just crash after i entered the character..
i already tried the code above, that was my original idea...
scanf ("%c", i);
if (i=='a')
{
printf ("the user enterered a thus it entered if");
scanf ("%c", i);
if (i=='a')
{
printf ("the user still...
i did test the code and when i enter a letter or a string or a float, it becomes an endless loop
pls help me, i am making a do while loop which wont accept invalid inputs..
these invalid inputs include outside the range of 1-100, negative numbers, and zero, also i would like my loop not to...
i understood the code, somewhow, but some parts of it were never taught yet, or i guess i wouldnt be taught to us, we have to research on our own, the arrays and buf parts things like that, i dont...
thank you for all the help. i just have to think of other ways do print that damn dealer card. i cant continue looking for bugs unless i knew how to solve this bug!
thanks again.
by the way,...
i didnt assign any expression to it cuz i just need a variable to store whatever the switch would return.
ur right, the example in my book put an expression in the return varibale, but that's...
i'm going to try learn arrays when all my bugs in my program are gone lol! and right now there's a LOT! all are logical errors really, whew.
/*BLACK JACK WITH FUNCTIONS*/
#include <stdio.h>...
ok so i'm gonna try things out, imma try to bring nSuit=rand()%4+1; out of the function and see what happens, thanx for the help!
wait so how am i gonna print its value then? then use the function again to deal a card? i really hope i'm not bugging you
we havent studied functions yet so i really dont know what i'm doing, i just followed the syntax on our book..wait...so u mean ..ah ok now i'm geting it, now what am i suppose to put it inside the...
nsuit is an integer, the formula that i did was for suit function to generate a number from one to 4, but i dont need the number, what i need is the suit itself so i used switch. what i want to do is...
i didnt quite get what u mean...
i'm sorry.
/*Function to Deal a card*/
char DealCard (nDCard)
{ char cCard;
nDCard=rand()%13+1;
someone?? pls pls pls pls
okay so here is the program flow..(this is a blackjack game)
1.deals one card to the dealer then prints it
2. prints concealed as the second card of the dealer should be concealed.
3. the next...
meaning..
nDCard1=DealCard();
printf ("%c", nDCard1);
is a correct syntax for printing the first generated value?
hi! i have a question with functions!
i created a function which deals a card, basically what i wanted to do is use the first return value again.
i dunno how!
example:
DealCard();