It is worth noting, however, that you could do better using the facilities the C++ programming language provides (for instance, you could use a class to incapsulate cards behaviour). And like all skills, it only improves by use! This is a skill, and it's one which is well worth developing as it helps you in the real world as well as in development. Hopefully, that should help you locate which part of that code has a problem, and what the problem is. code below: //Slot Machine Practice Problem. Im having trouble getting the program to check user input and randomly spin out the results. Did it do what you expect? If so, move on to the next line. It wants me to randomly display the results of the slot machine to the player, have 3 or more values for each wheel of the machine. Think about what each line in the code should do before you execute it, and compare that to what it actually did when you use the "Step over" button to execute each line in turn. You can now run your code line-by-line (called "single stepping") and look at (or even change) variable contents as necessary (heck, you can even change the code and try again if you need to). When it reaches the breakpoint, the debugger will stop, and hand control over to you. Put a breakpoint on the first line of the method, and run your app. Once you have an idea what might be going wrong, start using the debugger to find out why. If (choiceBoard = choiceNumberTwo)ĭisplayBoard = displa圜ards For ( int row = 0 row > choiceNumberOne įor ( int row = 0 row > choiceNumberTwo įor ( int column = 0 column < columnSize column++)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |