0
C++_Need Help Understanding "Break" statements.
Learning about "Break" statements, my question is what are they used for? I was reviewing this code from SoloLearn in C++, and if I comment out the break statements, every other case inside this code gets executed, Why? https://code.sololearn.com/ckaal3Q0hcD6/?ref=app
2 odpowiedzi
+ 4
Already asked question!
You can read my answer for detailed explanation
https://www.sololearn.com/discuss/2406604/?ref=app
+ 2
Thanks for the link Namit Jain
I was reading more about switch statements online and after reading some comments on the link you sent me.
I now understand that the break tells the program to stop or exit out. And the following switch statements won't execute.