Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了这种语法,不知道它是什么意思。
for( ; ; ) { //do stuff like read from a handle etc. }
我仍然在 C 语言的学习曲线上,所以如果你愿意,如果这是一个蹩脚的问题,请投反对票。
这是一个无限循环。如同while(1)
while(1)
真正要注意的唯一重要的事情是 for 循环看起来像for (initialize vars; continue condition; counters) . 由于没有 continue 条件,它只会继续运行(除非某处有 break 或 return 语句)。
for (initialize vars; continue condition; counters)