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

1st Jun 2018, 4:36 PM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
1 Odpowiedź
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
1st Jun 2018, 9:14 PM
Max
Max - avatar