bool endConditionMet = false;
int playerScore[4];
int numPlayers = 4;
for( int i = 0; i< numPlayers; i = (i+1)%numPlayers){
int diceRoll = // call the function that you are interested in
// Get user input here
if( endConditionMet == true ){
break; //This is the only way to stop the loop
// maybe your end condition can be if a score limit is met.
}
playerScore[i] += diceRoll;
}
Note: The line: i < numPlayers doesn't really do anything because it is always true. Therefore, you can replace this with true.