|
|
srand
once at the start of your program and not each time you run dieroll
dieroll
and store its returned value in firstdie
, then you call the check function passing total
as its argument but total
is a uninitialised variable declared in main.check
is being passed some random garbage value - You should be passing the result returned from dieroll
into check
|
|