Some errors and warnings i dont understand

This is a discussion on Some errors and warnings i dont understand within the C Programming forums, part of the General Programming Boards category; Ok ive tried to create a simple craps game, yet there are some errors and warnings i cant figure out.
...

Originally posted by Champion 1) In secroll(), it is not good to declare int sum while your input is called sum as well.

2) I am not sure if you can declare variable before the funciton prototypes.

3) missing; - usually when you miss a single ; or put wrong braces in one place, you will get lots of errors.

Hope this helps

1) Yeah, that's a 'BadThing(TM)' in C.
2) Yes, you can declare function prototypes and global variables any place you feel like. They're global so it doesn't matter where they're declared really, except for the fact that they need to be declared before you actually use them. This is valid code:

whenever I run the program i insert my bet into a scanf yet when i press enter nothing happens. I have to press another key to make the rest of the program to happen. What is happening? did I do something wrong with my scanf? Thanks in advance

whenever I run the program i insert my bet into a scanf yet when i press enter nothing happens. I have to press another key to make the rest of the program to happen. What is happening? did I do something wrong with my scanf? Thanks in advance