How to store goto labels in an array and then jump to them?

前端 未结 11 1610
说谎
说谎 2020-12-28 16:20

I want to declare an array of \"jumplabels\".

Then I want to jump to a \"jumplabel\" in this array.

But I have not any idea how to do this.

It should

11条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 17:02

    could you use function pointers instead of goto?

    That way you can create an array of functions to call and call the appropriate one.

提交回复
热议问题