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

后端 未结 4 1844
北荒
北荒 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 03:58

    Labels are used as targets for goto, but, if you put a label, you are not forced to use goto, if you do not see any goto in the code you are reading, the people/guy who wrote that code probably used them for actually labeling purposes (duh!).

提交回复
热议问题