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

前端 未结 14 1602
执念已碎
执念已碎 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:29

    Use function pointers and a while loop. Don't make a piece of code someone else will have to regret fixing for you.

    I presume you're trying to change the address of the label somehow externally. Function pointers will work.

提交回复
热议问题