It keeps looping and looping the same output, for example:
Simple Queue Example - Array
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
Until it crashes
How do I stop the loop like this, I just want one Main Menu:
Simple Queue Example - Array
Queue Main Menu
1.Insert
2.Remove
3.Display
Others to exit
Enter Your Choice :
run the whole code on ideone.com, put it to c++, and you'll see what I mean
You never do anything to end the look. You initialise exit to 1, and you never change its value. And the break statement at line 21 doesn't break out the loop, it just ends the case in your switch statement.
Although my point still stands. If you want the loop to repeat until a certain condition is met, you should initialise the variable such that the loop keeps looping. Then, when that condition is met, you change the variable such that the loop exits.