Have you tried compiling this? I don't think this would compile. If the function starts with void you do not need to return any value or call main(). The function will automatically return to main and continue the program.
Did you pay any attention to my previous code? Calling the dice function in your code does nothing. You have to pass in the variable sum as a reference like I did.
You don't even need to pass in dice1, and dice2. You can just initialize them in the function.
You are not understanding parameters to functions and return values from functions.
Line 52 calls Dice() but ignores the return value. Dice() returns the sum. Dice does not modify game()'s sum variable; sum remains uninitialized in game().
Dice() also takes two parameters (dice1 and dice2) for no reason, as again they are uninitialized in game() and game()'s dice1 and dice2 variables are not modified by Dice().
If i don't have the main like you said, once it runs the rules, it says "press any key to continue" then just exits our of the program. Same with the game, after its done, it just ends instead of returning to the home screen.
What are parameters?
whats the difference if i say
dice (int dice1, int dice2);
or
dice();
int dice 1;
int dice 2;
i am new at comp prog so i have no idea how any of this works