Is it possible to store the address of a label in a variable and use goto to jump to it?

前端 未结 14 1614
执念已碎
执念已碎 2020-12-04 09:35

I know everyone hates gotos. In my code, for reasons I have considered and am comfortable with, they provide an effective solution (ie I\'m not looking for \"don\'t do that\

14条回答
  •  孤城傲影
    2020-12-04 10:19

    Read this: setjmp.h - Wikipedia As previously said it is possible with setjmp/longjmp with which you can store a jumppoint in a variable and jump back later.

提交回复
热议问题