Strange Integer Behavior

Discussion in 'C++' started by yohosuff, Aug 28, 2010.

  1. yohosuff

    yohosuff New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    <div>Hi there! I was trying to solve the 8 Queen problem when I came across another interesting problem. At some point during program execution, the value of variable "queensPlaced" jumps from 6 to 99. During debugging, I determined that it occurs during the following block of code:

    <div style="margin:20px; margin-top:5px"> Code:
    //down-right
    if(y+i
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice