Infinite loop application - for(;;)

后端 未结 5 756
一生所求
一生所求 2020-12-22 03:29

I am trying to understand the concept behind the for loop example

for (;;)
{
//write code
}

I understand what it does and how it\'s the sa

5条回答
  •  温柔的废话
    2020-12-22 04:12

    In general it is ok, there's nothing to worry about. It is about of programmer's preferences.

    I prefer while(true), from my point of view it is more elegant form of infinite loop. Someone else may prefer for(;;) approach.

提交回复
热议问题