|
发表于 2019-8-21 19:03:21
|
显示全部楼层
不知道为何报错了,如下。。。
025.c: In function 'bullets':
025.c:51:23: error: '(struct GAME *)&bullet' is a pointer; did you mean to use '->'?
bullet.x=0;
^
->
025.c:52:23: error: '(struct GAME *)&bullet' is a pointer; did you mean to use '->'?
bullet.y=0;
^
->
025.c:53:23: error: '(struct GAME *)&bullet' is a pointer; did you mean to use '->'?
bullet.shape='I';
^
->
025.c: In function 'hide':
025.c:65:37: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(obstacles.x==bullet[j].x&&obstacles.y==bullet[j].y)
^
->
025.c:65:63: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(obstacles.x==bullet[j].x&&obstacles.y==bullet[j].y)
^
->
025.c:67:42: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=0;
^
->
025.c: In function 'planemove':
025.c:320:38: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
Pos(obstacles.x,obstacles.y);
^
->
025.c:320:50: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
Pos(obstacles.x,obstacles.y);
^
->
025.c:322:34: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.y++;
^
->
025.c:323:37: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(obstacles.y>28)
^
->
025.c:325:42: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=rand()%56;
^
->
025.c:326:34: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.y=rand()%8;
^
->
025.c:327:37: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(obstacles.x%2!=0)
^
->
025.c:329:42: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=obstacles.x-1;
^
->
025.c:329:54: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=obstacles.x-1;
^
->
025.c: In function 'obstacle':
025.c:348:26: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=rand()%56;
^
->
025.c:349:26: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.y=rand()%14;
^
->
025.c:350:29: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(obstacles.x%2!=0)
^
->
025.c:352:34: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=obstacles.x-1;
^
->
025.c:352:46: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
obstacles.x=obstacles.x-1;
^
->
025.c: In function 'obstaclehide':
025.c:367:46: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(temp->x==obstacles.x&&temp->y==obstacles.y)
^
->
025.c:367:68: error: '(struct GAME *)&obstacles' is a pointer; did you mean to use '->'?
if(temp->x==obstacles.x&&temp->y==obstacles.y)
^
-> |
|