RSS Forums RSS
Please support our C++ advertiser: Programming Forums

Please Help C++ Connect four program due tonight by 12 (2)

Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,563
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 40
Solved Threads: 977
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Please Help C++ Connect four program due tonight by 12 (2)

  #2  
Apr 27th, 2006
>> if(Board[row][cur_col] == Board[row + 1][cur_col- 1] && Board[row + 1][cur_col - 1] == Board[row + 2][cur_col - 2] && Board[row + 2][cur_col - 2] == Board[row + 3][cur_col - 3])


when row == 5 the above causes exception because Board[row+1] is illegal cell reference. I responded with 1 to the question "PlayerO please enter the column in which you would like your marker placed". variable i is hardcoded to = 5 in main(), which may explain the problem.
Reply With Quote  
All times are GMT -4. The time now is 9:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC