| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2197 人关注过本帖
标题:敬请各位大侠帮助!!!!!!!!!!!
只看楼主 加入收藏
showy
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-5-4
收藏
 问题点数:0 回复次数:3 
敬请各位大侠帮助!!!!!!!!!!!
struct excursions{signed int direction;         
                  int remove;                                       
} excursions;


struct deflexion{signed int direction;           
                  int angle;   
} deflexion;

struct body_coordinates{
signed long int right_x_coordinates;        
signed long int right_y_coordinates;      
int x_coordinates_increment;               
int y_coordinates_increment;            
} body_coordinates;

 struct swy_body_property{
   struct body_coordinates body_coordinates;
   
  float showy_body_direction;

  float swy_a;
  float swy_a_direction;

  float swy_v;
  float swy_v_direction;
  struct excursions swy_displacement;
  struct deflexion swy_angle;
  } swy_body_property;

报错位置为下述各句:
void body_adjust(int a,struct swy_body_property* current_property)
{
switch(a){
case 0x7777:
          * current_property->swy_displacement->direction=0;
                            * current_property->swy_displacement->remove=0;
          * current_property->swy_angle->direction=0;
          * current_property->swy_angle->angle=0;
           break;

case 0x7377:
          * current_property->swy_displacement->direction=1;
                             * current_property->swy_displacement->remove=remove1;
          * current_property->swy_angle->direction=1;
          * current_property->swy_angle->angle=l_angle8;
          break;
case 0x7773:  
          * current_property->swy_displacement->direction=-1;
                            * current_property->swy_displacement->remove=remove1;
          * current_property->swy_angle->direction=-1;
          * current_property->swy_angle->angle=l_angle8;
         break;
case 0x7767:  
          * current_property->swy_displacement->direction=1;
                           * current_property->swy_displacement->remove=remove1;
          * current_property->swy_angle->direction=-1;
          * current_property->swy_angle->angle=l_angle8;
           break;
case 0x6777:  
          * current_property->swy_displacement->direction=-1;
                            * current_property->swy_displacement->remove=remove1;
          * current_property->swy_angle->direction=-1;
          * current_property->swy_angle->angle=l_angle8;
         break;
错误信息为:
"functions_source.c", line 177: error: expression must have pointer type
"functions_source.c", line 178: error: expression must have pointer type
"functions_source.c", line 179: error: expression must have pointer type
"functions_source.c", line 180: error: expression must have pointer type
"functions_source.c", line 194: error: expression must have pointer type
"functions_source.c", line 195: error: expression must have pointer type
"functions_source.c", line 196: error: expression must have pointer type
"functions_source.c", line 197: error: expression must have pointer type
"functions_source.c", line 203: error: expression must have pointer type
"functions_source.c", line 204: error: expression must have pointer type
"functions_source.c", line 205: error: expression must have pointer type
"functions_source.c", line 206: error: expression must have pointer type
"functions_source.c", line 211: error: expression must have pointer type
"functions_source.c", line 212: error: expression must have pointer type
"functions_source.c", line 213: error: expression must have pointer type
"functions_source.c", line 214: error: expression must have pointer type
"functions_source.c", line 219: error: expression must have pointer type
"functions_source.c", line 220: error: expression must have pointer type
"functions_source.c", line 221: error: expression must have pointer type
"functions_source.c", line 222: error: expression must have pointer type
20 errors detected in the compilation of "functions_source.c".
初学者 无知 敬请各位大侠指教
搜索更多相关主题的帖子: angle 
2008-05-04 03:03
koolism
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2007-3-22
收藏
得分:0 
将:
* current_property->swy_displacement->direction=0;
改为:
current_property->swy_displacement.direction=0;
其它一样处理
2008-05-04 03:20
showy
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-5-4
收藏
得分:0 
谢谢
谢谢了,能解释一下吗。我想知道错误原因,不能知其然而不知其所以然
谢谢,
2008-05-04 07:30
StarWing83
Rank: 8Rank: 8
来 自:仙女座大星云
等 级:贵宾
威 望:19
帖 子:3951
专家分:748
注 册:2007-11-16
收藏
得分:0 
current_property是指针。对指针使用->
*current_property是结构体(即指针指向的东西),对结构体使用.
结构体的域是什么就用什么。你那个域是结构体,所以用.

专心编程………
飞燕算法初级群:3996098
我的Blog
2008-05-04 08:02
快速回复:敬请各位大侠帮助!!!!!!!!!!!
数据加载中...
 
   



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

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