| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 515 人关注过本帖
标题:急救!!!!!!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
快速回复:急救!!!!!!C语言大程!!!!
数据加载中...
 
   



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

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