labels vs including process | Sololearn: Learn to code for FREE!

0

labels vs including process

Why include the whole process library for an exit() if one can just use a label to go-to the end of main() ?

1 Answer

New Answer

0

because the goto statement has to be in the same function as the label: http://en.cppreference.com/w/cpp/language/goto read the article linked under further reading