Thread: debugging function

  1. #1
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266

    debugging function

    hey all, i'm trying to find the sum of a portion of a 4x13 array and could use some help making sure my logic is sound. this will be used to find a straight in poker. i have msvc++, can i use the debugger to solve this?

    Code:
    	for (int row=0; row<4; row++)
    	{for (int column=0; column<=13; column++)
    	{if (fv_hand[row][column]==1)
    	{if (fv_hand[0][column]+fv_hand[0][column+1]+
    		 fv_hand[0][column+2]+fv_hand[0][column+3]+
    		fv_hand[0][column+4]+fv_hand[1][column]+
    		fv_hand[1][column+1]+fv_hand[1][column+2]+
    		fv_hand[1][column+3]+fv_hand[1][column+4]+
    		fv_hand[2][column]+fv_hand[2][column+1]+
    		fv_hand[2][column+2]+fv_hand[2][column+3]+
    		fv_hand[2][column+4]+fv_hand[3][column]+
    		fv_hand[3][column+1]+fv_hand[3][column+2]+
    		fv_hand[3][column+3]+fv_hand[3][column+4]==5)
    				strt_yn=true;
    Last edited by blight2c; 04-19-2002 at 05:50 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM