调试总会出现declaration of“XXX”follows non C语言

#include
#define N 20

void judge(point_t array[30], int point_num)
{
verti(array, point_num);

}

void verti(point_t point[N], int point_num)
{
int i = 0;
int count = 1;
int a,b;
int j;
int begin;
begin = point_num;

for(j = 0; j<begin; j++)
{
    a = point[j].x - point[begin - j].x;
    b = point[j].x - point[begin - j].x;

    if(abs(a) <= 4&& abs(b) <= 4)
    {
        int k;
        while(point_num)
        {
            if(point[i].y - point[point_num - i].y == 0)
            {
                    for(k = 0; k<point_num; k++)
                    {
                            int in = 4;
                            while(in--)
                            {
                                    if( (in - point[i].x == point[k].x) || (point[k].x == (point[i].x - in)))
                                    {
                                            count++;
                                    }

                                    else
                                    {
                                            break;
                                    }

                            }
                    }

            }
            else
            {
                    i++;
            }
            point_num--;
       }
       if(count == 5)
       {
            printf("棋子成功连成五子!\n");
            exit(0);
       }
    }
    else
    {
            break;
    }

}

查看全部
u010814622
chocolate_25
2015/07/13 06:29
  • c
  • 调试
  • 点赞
  • 收藏
  • 回答
    私信

3个回复