码迷,mamicode.com
首页 > 其他好文 > 详细

for循环的一个注意点

时间:2014-05-07 10:26:55      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:int   for      for循环   死循环   unsigned   

unsigned int i =10;

for(i;i > 0; i--) {

xxxxx

}

因为i是unsigned int 类型的,永远不可能小于0,也就是说是个死循环了。

for循环的一个注意点,布布扣,bubuko.com

for循环的一个注意点

标签:int   for      for循环   死循环   unsigned   

原文地址:http://www.cnblogs.com/superPerfect/p/3710348.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!