【发布时间】:2010-09-18 10:58:32
【问题描述】:
本着Do your loops test at the top or bottom?等问题的精神:
无限循环使用哪种样式,为什么?
- while (true) { }
- do { } while (true);
- 对于 (;;) { }
- 标签:...转到标签;
【问题讨论】:
-
Endless loop in C/C++ 的可能副本
-
在某些圈子里很流行做
#define ever ;;,这样你就可以做for(ever){ … }。
标签: c++ c coding-style