ok here is the program again, now producing no errors but getting weird results (instead of card numbers I am getting other results when running it,)
It's a blackjack game :)
/* Filename:...
Type: Posts; User: Bassglider
ok here is the program again, now producing no errors but getting weird results (instead of card numbers I am getting other results when running it,)
It's a blackjack game :)
/* Filename:...
Gotcha, that fixed it :) Thanks Matsp now I understand
oh thanks, that fixed the warning :)
Ok, yes that must be a typo in the book. The second one is fixed. that logic I understand.
What I dont understand is what the first is attempting to do in this function:
// This function...
I am still wondering about this error:
(*numCards)-; // Says ERROR: syntax error before ';' token
I also get the same error for int i = -;
/* Clears everything on screen */
void...
Ok, how does this look now? I know there are different opinions of ways of indenting, but is this easy to read and done correctly?
main()
{
int numCards; /* Equals 52 at...
Yeah, I know, I'm learning, I copied that straight out of a book so I can type it out and learn what everything is doing.
Do you have any suggested source I can learn flow and tabbing from to make...
Thank you pankaj
here is the program :)
/* Filename: BlakJack.c */
#include <stdio.h>
#include <time.h>
#include <ctype.h>
#include <stdlib.h>
Naw, that doesn't work either
Are you saying that you replace main() with int main(void) { ?
Even with that change the function I am working on does not get fixed, the main function is here and returns no errors or warnings...
Ohhh, ok gotcha, thanks for that clarification, that compiler won't think its a nested function then correct?
Lol, no it wasn't a joke :)
i wanted to know if there was a difference in using the | and ¦ in the purpose of writing the logical OR
I am closing my braces, does anything look off here?
void playerGetsCard(int *numCards, int cards[52], int playerPoints[2])
{
int newCard;
newCard = dealCard(numCards, cards);
printf("You...
While doing an exercise out of this book I run into the syntax error after (*numCards)-;
which is exactly what the book says, I know that the book can be wrong, what would be suggested to fix this...
I am doing an exercise out of a book which apparently has nested functions.
I read on http://lists.apple.com/archives/xcode-users/2005/Nov/msg00271.html
that xcode does not support them. The...
Cool thanks || it is
I didn't know vertical/pipe/broken bar ( |, ¦ ) those two equal the same thing?
On the wiki page it says that Broken bar (¦) is a separate character from |
Please clarify
I cannot find where the OR symbol is on the keyboard it looks like a || cut horizontally, but not a :
You are referring to prototypes correct?
I am also just about to order Pratas book C Primer Plus as a book to accompany K&R. I believe K&R would be a good way to expand upon the details of...
thanks :)
Do these new times == ANSI C?
If so then why does K&R refer to their updated version as ANSI C?
Thank you for the clarification
Bassglider
When I compile a simple program with GCC I get no errors and it runs fine
When I compole the same simple program with Xcode (Command Line C) I get these errors:
Warning: return type defaults to...
I have read a beginners book in C so I think I have the foundation concepts in place. As for a first book for C++ would this be a good recommendation? I am fairly quick and intelligent and I read...
Ok, thanks, well I knew that CS wouldn't be all about programming. I do wish to learn as much as I can about everything around it.
When it comes to mathematics is any of it done on paper in...
this is a great community, I ask one question and get 20 responses! I'm glad to be a part of this. I think the best option for me would be to finish this beginners book and then read the next C...