Debug Error! Program: ... Studio 2008\Projects\Yahtzee\Debug\Yahtzee.exe Module: ... Studio 2008\Projects\Yahtzee\Debug\Yahtzee.exe File: Run-Time Check Failure #2 - Stack around the variable 'dice' was corrupted. |
|
|
When you first fill the dice array with random rolls, your for loop should use i < 5, not i <= 5. Ironically, you have that set up properly in your second loop that conditionally rerolls. |
Make sure to always call cin.ignore(); after using a "cin >>" command. |
Matt23488 wrote: |
---|
What exactly does that do? In both my C++ classes we never learned to do that. |