记录详情

Compile Error

/in/foo.c: In function 'hanoi':
/in/foo.c:23:9: error: too many arguments to function 'move'
         move(i , A , C,pa,pb,pc,pd);
         ^~~~
/in/foo.c:4:6: note: declared here
 void move(int i , char x , char y,int *a,int *b,int *c);
      ^~~~
/in/foo.c:27:33: warning: passing argument 5 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , A , C , B,&a,&b,&c,&p);   //函数递归调用 
                                 ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:27:36: warning: passing argument 6 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , A , C , B,&a,&b,&c,&p);   //函数递归调用 
                                    ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:27:39: warning: passing argument 7 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , A , C , B,&a,&b,&c,&p);   //函数递归调用 
                                       ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:27:42: warning: passing argument 8 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , A , C , B,&a,&b,&c,&p);   //函数递归调用 
                                          ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:28:9: error: too many arguments to function 'move'
         move(i , A , C,pa,pb,pc,pd);
         ^~~~
/in/foo.c:4:6: note: declared here
 void move(int i , char x , char y,int *a,int *b,int *c);
      ^~~~
/in/foo.c:29:33: warning: passing argument 5 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , B , A , C,&a,&b,&c,&p);
                                 ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:29:36: warning: passing argument 6 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , B , A , C,&a,&b,&c,&p);
                                    ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:29:39: warning: passing argument 7 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , B , A , C,&a,&b,&c,&p);
                                       ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c:29:42: warning: passing argument 8 of 'hanoi' from incompatible pointer type [-Wincompatible-pointer-types]
         hanoi(i - 1 , B , A , C,&a,&b,&c,&p);
                                          ^
/in/foo.c:18:6: note: expected 'int *' but argument is of type 'int **'
 void hanoi(int i , char A , char B , char C,int *a,int *b,int *c,int *p)
      ^~~~~
/in/foo.c: At top level:
/in/foo.c:33:6: error: conflicting types for 'move'
 void move(int i , char x , char y,int *a,int *b,int *c,int *p)
      ^~~~
/in/foo.c:4:6: note: previous declaration of 'move' was here
 void move(int i , char x , char y,int *a,int *b,int *c);
      ^~~~
/in/foo.c: In function 'move':
/in/foo.c:70:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
   printf("%d %d %d\n",a,b,c);
           ~^
           %ls
/in/foo.c:70:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=]
   printf("%d %d %d\n",a,b,c);
              ~^
              %ls
/in/foo.c:70:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'int *' [-Wformat=]
   printf("%d %d %d\n",a,b,c);
                 ~^
                 %ls

信息

递交者
类型
递交
题目
2-3 Hanoi游戏的状态
比赛
南师大2018年蓝桥杯热身赛
语言
C
递交时间
2018-12-12 15:32:07
评测时间
2018-12-12 15:32:17
评测机
分数
0
总耗时
23ms
峰值内存
4.043 MiB