   while / if... why wont this work
  Why wont this work? (you only need to look at line 2 and 3) "while" wont work but ifi put in "if" it works fine.int i =0;// while(COLUM_AMOUNT &gt;= i){ // does not work if (COLUM_AMOUNT &gt;= i){// works    for(int s = 0;ROW_AMOUNT &gt; s; s++){   if(focus.screen_location.x == BLOCK_WIDTH * s && focus.screen_location.y == WINDOW_HEIGHT - (BLOCK_WIDTH * (i + 1))){  if(CheckBlockCollision(focus) || focus.screen_location.y + BLOCK_WIDTH == WINDOW_HEIGHT){  SDL_WM_SetCaption("change 1", 0);   restingblocks = <span class="cpp-number">1</span>;}   }   <span class="cpp-keyword">if</span>(ROW_AMOUNT &amp;lt;= s){   i++;   s = <span class="cpp-number">0</span>;   <span class="cpp-keyword">if</span>(COLUM_AMOUNT &amp;lt;= i){   i = <span class="cpp-number">0</span>;}   }   }}</pre></div><!–ENDSCRIPT–> 
  Define "wont work". Does it not compile? Does it not behave like you expect? Does a little gnome leap out of your CD-ROM drive and put a pancake on your head?   ;  I dont get any errors (when using "while"), just the game locks up right from the beginning (with "if" all is good).   ;  A while loop will keep repeating until the condition is false. If it's always true then it loops forever and appears to have "locked up."   ;  The 'while' construct means exactly what it says: it keeps doing the body of the loop (the stuff within the {} associated with the while()) for as long as the condition specified holds. You specified a condition 'COLUM_AMOUNT >= i'; within the loop, neither 'COLUM_AMOUNT' nor 'i' has its value changed; so if the loop is entered, nothing can cause it to exit.BTW, it's spelled "column" :)   