
please wait
|
|
In function 'int main()': 21:21: error: expected primary-expression before 'int' 21:36: error: expected primary-expression before 'int' 11:6: warning: unused variable 'sum' [-Wunused-variable] In function 'int getRollDice()': 38:27: error: 'rollCount' was not declared in this scope 44:24: error: 'num' was not declared in this scope 50:1: warning: control reaches end of non-void function [-Wreturn-type] |
int
, but your return
is inside an if
, so it may not happen.
|
|
if (sum == num)
<=
will cause 1 extra roll. Make it a <
Crap - I have just seen, you don't have an increment in your for loop:
|
|
|
|
Do I need to add the same parameters to my function everywhere I call for it? |
|
|
|
|
|
|
|
|