出现这个的原因为什么啊 急Error while running C/C++ Compiler 大神帮帮忙 程序如下
#include"common.h"#include"include.h"voidsignal_detect();externint16pre_right_ad;exte...
#include "common.h"
#include "include.h"
void signal_detect();
extern int16 pre_right_ad;
extern int16 right_ad;
extern int16 pre_left_ad;
extern int16 left_ad;
extern int16 pre_mid_behind_ad;
extern int16 mid_behind_ad;
extern int16 pre_mid_front_ad;
extern int16 mid_front_ad;
extern int16 Min_left_ad;
extern int16 Max_left_ad;
extern int16 Min_right_ad;
extern int16 Max_right_ad;
extern int16 Min_mid_front_ad;
extern int16 Max_mid_front_ad;
extern int16 Min_mid_behind_ad;
extern int16 Max_mid_behind_ad;
extern float speak_count ;
extern float Motor_Direction;
extern float DISspeak;
extern float start_flag;
extern float speed_decect;
extern float steer_out;
extern float steer_mid;
extern float set_speed;
extern float speed_max;
extern float steer_max;
extern float speed_min;
extern float Motor_Speed;
extern float uTicks_Brake1;
extern float set_speed_up;
extern float out_flag;
extern float stop_run_flag;
extern float set_rampway_vol;
extern float steer_min;
extern float stright_flag;
extern float set_cross_vol;
extern float cross_speed;
extern float will_start_flag;
extern float will_start_count;
extern float straightaway_count;
extern float time_count_start;
extern float time_count;
extern float signal_delay_flag;
extern float uTicks_Brake;
extern float rampway_speed_red;
extern float miao_count;
extern float uTicks_signal;
void main_control()
{
uint16 i;
uint16 tmp;
pre_right_ad=right_ad;
pre_left_ad=left_ad;
pre_mid_behind_ad=mid_behind_ad;
pre_mid_front_ad=mid_front_ad;
for(i=4;i<8;i++)
{
tmp=hw_ad_ave(1,i,10,3);
if(tmp>=1024) tmp=1024;
if(tmp<=0) tmp=0;
if(i==4){left_ad=tmp;}
else if(i==5){right_ad=tmp;}
else if(i==7){mid_front_ad=tmp;}
else if(i==6){mid_behind_ad=tmp;}
}
left_ad = getNormalizedADValue(left_ad,Min_left_ad,Max_left_ad);
right_ad = getNormalizedADValue(right_ad,Min_right_ad,Max_right_ad);
mid_front_ad=getNormalizedADValue(mid_front_ad,Min_mid_front_ad,Max_mid_front_ad); mid_behind_ad=getNormalizedADValue(mid_behind_ad,Min_mid_behind_ad,Max_mid_behind_ad);
} 展开
#include "include.h"
void signal_detect();
extern int16 pre_right_ad;
extern int16 right_ad;
extern int16 pre_left_ad;
extern int16 left_ad;
extern int16 pre_mid_behind_ad;
extern int16 mid_behind_ad;
extern int16 pre_mid_front_ad;
extern int16 mid_front_ad;
extern int16 Min_left_ad;
extern int16 Max_left_ad;
extern int16 Min_right_ad;
extern int16 Max_right_ad;
extern int16 Min_mid_front_ad;
extern int16 Max_mid_front_ad;
extern int16 Min_mid_behind_ad;
extern int16 Max_mid_behind_ad;
extern float speak_count ;
extern float Motor_Direction;
extern float DISspeak;
extern float start_flag;
extern float speed_decect;
extern float steer_out;
extern float steer_mid;
extern float set_speed;
extern float speed_max;
extern float steer_max;
extern float speed_min;
extern float Motor_Speed;
extern float uTicks_Brake1;
extern float set_speed_up;
extern float out_flag;
extern float stop_run_flag;
extern float set_rampway_vol;
extern float steer_min;
extern float stright_flag;
extern float set_cross_vol;
extern float cross_speed;
extern float will_start_flag;
extern float will_start_count;
extern float straightaway_count;
extern float time_count_start;
extern float time_count;
extern float signal_delay_flag;
extern float uTicks_Brake;
extern float rampway_speed_red;
extern float miao_count;
extern float uTicks_signal;
void main_control()
{
uint16 i;
uint16 tmp;
pre_right_ad=right_ad;
pre_left_ad=left_ad;
pre_mid_behind_ad=mid_behind_ad;
pre_mid_front_ad=mid_front_ad;
for(i=4;i<8;i++)
{
tmp=hw_ad_ave(1,i,10,3);
if(tmp>=1024) tmp=1024;
if(tmp<=0) tmp=0;
if(i==4){left_ad=tmp;}
else if(i==5){right_ad=tmp;}
else if(i==7){mid_front_ad=tmp;}
else if(i==6){mid_behind_ad=tmp;}
}
left_ad = getNormalizedADValue(left_ad,Min_left_ad,Max_left_ad);
right_ad = getNormalizedADValue(right_ad,Min_right_ad,Max_right_ad);
mid_front_ad=getNormalizedADValue(mid_front_ad,Min_mid_front_ad,Max_mid_front_ad); mid_behind_ad=getNormalizedADValue(mid_behind_ad,Min_mid_behind_ad,Max_mid_behind_ad);
} 展开
3个回答
2014-07-05
展开全部
common.h这个头文件和stdio。h不一样 不是Visual C++ 6.0自带的。。。。。拙见
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
当运行的C/C++编译器出错误!
追问
这我也知道,求具体解决方案
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
编译错误,换句话说,你有非法的语句
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询