标题:急救!!!!!!C语言大程!!!!
只看楼主
大程
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-6-20
 问题点数:0 回复次数:0 
急救!!!!!!C语言大程!!!!
结构体出了问题,请牛人帮忙解决!!!
是调用出问题了么??



#include <dos.h>
#include <stdio.h>
#include <graphics.h>
#include <math.h>
#include<conio.h>
#include <alloc.h>
#include <stdlib.h>



/*结构体定义/
typedef struct Point_struct{
    int mx;
    int my;
 } Point;


typedef struct tagPlane_struct{
    Point initPoint;        /*玩家起始位置坐标*/
    Point pCoordination;
    int state;
    int Num;
    char name[10];
 } tagPlane;



typedef struct tagPlayer_struct{
      tagPlane Plane1;
      tagPlane Plane2;
      tagPlane *Plane;

      int mode;
      int pNum;
      int color;
    } tagPlayer;
tagPlayer  playerA, playerB, *player;


/*赋初值*/
playerA.plane1.initPoint.mx=2;
playerA.plane1.initPoint.my=442;
playerA.plane2.initPoint.mx=8;
playerA.plane2.initPoint.my=448;

playerB.plane1.initPoint.mx=407;
playerB.plane1.initPoint.my=127;
playerB.plane2.initPoint.mx=413;
playerB.plane2.initPoint.my=133;



int main()
{
    int x, ix, y, iy;

    player=&playerA;
    player.player

   x=(*player).(*plane).pCoordination.mx;
   y=(*player).(*plane).pCoordination.my;
   ix=(*player).(*plane).initPoint.mx;
   iy=(*player).(*plane).initPoint.my;

    printf("%d  %d  %d  %d  ", x, y, ix, iy);

}
搜索更多相关主题的帖子: 急救 
2008-06-20 19:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-220287-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.890115 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved