Breaking out of a loop from within a function called in that loop

后端 未结 14 978
盖世英雄少女心
盖世英雄少女心 2020-12-30 20:31

I\'m currently trying to figure out a way to break out of a for loop from within a function called in that loop. I\'m aware of the possibility to just have the

14条回答
  •  自闭症患者
    2020-12-30 20:42

    Consider inlining your function manually in the for loop. If this function is called in multiple loops, define it as a macro:

    #define f()\
    printf("a: %d", a);\
    break;
    

提交回复
热议问题