Exit function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Exit function

how do we use exit function in cpp program

21st Sep 2017, 5:34 PM
Ddhruv
Ddhruv - avatar
2 Answers
+ 4
In larger codes it can be more efficient to just "exit right now" rather than potentially wasting time writing recovery code. That's the case here (no point in doing anything but exit / they're big enough already): Line 26: https://code.sololearn.com/cyt3z1m2z69Q/?ref=app Line 97: https://code.sololearn.com/cpogCPP6rG33/?ref=app
21st Sep 2017, 8:45 PM
Kirk Schafer
Kirk Schafer - avatar
+ 3
thanks for your help
22nd Sep 2017, 4:37 PM
Ddhruv
Ddhruv - avatar