0

hi,
i have one question:
does anybody know how to end program.
i have one function in whom i calculate two numbers.
i want to end program if my number is to big

for example
12345 + 91111=103456

but i don't want that my has 6 digits so i want to exit

4
Contributors
4
Replies
8
Views
9 Years
Discussion Span
Last Post by harryoma
0

What they are trying to say is, it's bad practice to exit your program spontaneously. Objects would be left undestroyed, memory orphaned, and it just doesn't look professional. Instead, use logical blocks (if/else, switch, while, etc) to stream something like that (an exit condition) towards the final return call in main().

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.