performing unconditional jumps
C++/CLI provides two keywords—break and continue—with which you can jump unconditionally
within a loop. The break statement causes you to exit the loop immediately. The continue statement
abandons the current iteration and goes back to the top of the loop ready for the next iteration.
Note The break and continue statements can make it difficult to understand the logical
flow through a loop. Use break and continue sparingly to avoid complicating your code
unnecessarily.
In this exercise, you will modify the main loop in your Calendar Assistant application. You will give
the user the chance to break from the loop prematurely, skip the current date and continue on to the
next one, or display the current date as normal.
1.
Continue working with the project from the previous exercise.
Do'stlaringiz bilan baham: |