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


if(result > 99999) return 0;

*mumbles about multiple exit points*


commented: :) +9

Or *mumble mumble*

if(result > 99999)

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().

thank you all very much, i think i know now;)