including a "cast" or "die" class. |
I see no cast or die class.
Other comments.
Line 15: score is an uninitialized variable (garbage). You probably want score to be an int, not a double.
Line 29: You're declaring a variable (cast), but it goes out of scope at line 34. Move it to line 14.
Line 32: This is where you want your random calculation.
Line 35,42,49,56,63,70: Syntax problem with these lines. You either need to increment score, or add a value to it.
1 2 3 4
|
score++; // Increment score
// or
score += 1; // Add a value to the score
|
Line 82: Your logic is reversed. If line 80 is true, then the user does not want to continue and playAgain should be false.
Line 83: playAgain wasn't initialized, you need to set the true condition.
80 81 82 83
|
if (choice == "Yes" || choice == "Y" &|| choice == "yes")
playAgain = true;
else
playAgain = false;
|
Line 85: You're using the assignment operator (=), not the comparison operator (==). The if statement needs () around the condition.
Line 87: Ditto line 29.
And finally, you need a loop of some sort to play another round of the game.