What does this “label” mean in C++?

后端 未结 4 1851
北荒
北荒 2021-01-23 03:34

I was reading some c++ code, and i saw something interesting.

The code was something like this:

repeat:
    ...code here....
fallback:
    ...code here.         


        
4条回答
  •  悲&欢浪女
    2021-01-23 04:07

    It is a label, to which you can jump using a goto.

    Whether one should use gotos in a program is another matter entirely.

提交回复
热议问题