redefinition of default parameter : parameter 5

void CMsMgr::Update(unsigned int messType,unsigned int p1,unsigned int p2, const std::string & msg="",unsigned int reqid=0) { /* ...... */ } 上面这段代码 会提示下面的错误 error C2572: 'Update' : redefinition of default parameter : parameter 5

很明显,最后两个参数都由文体。不应该再重新定义。

compiling UART-EEPROM.c... UART-EEPROM.c(38): error C25: syntax error near ',' UART-EEPROM.c(91): error C95: 'EEPROM_WriteBytes': too many actual parameters UART-EEPROM.c(99): warning C188: 'parameter 1': value truncated UART-EEPROM.c(126): warning C188: 'parameter 2': value truncated UART-EEPROM.c(174): error C67: 'U1TX_H': undefined identifier UART-EEPROM.c(260): warning C122: '[]': unknown size UART-EEPROM.c(267): warning C190: 'UART1_SendU32': recursive call to non-reentrant function UART-EEPROM.c(268): warning C188: 'parameter 1': value truncated UART-EEPROM.c(370): error C25: syntax error near ',' UART-EEPROM.c(390): error C25: syntax error near 'data' UART-EEPROM.c(390): error C25: syntax error near '[' UART-EEPROM.c(390): error C25: syntax error near ']' UART-EEPROM.c(393): warning C194: obsolete declaration: use '<type> data EA' UART-EEPROM.c(395): error C53: redefinition of 'IAP_TRIG' UART-EEPROM.c(396): error C53: redefinition of 'EA' UART-EEPROM.c(399): error C53: redefinition of '_nop_': different return types UART-EEPROM.c(399): error C53: redefinition of '_nop_': different return types UART-EEPROM.c(399): error C53: redefinition of '_nop_': different return types UART-EEPROM.c(399): error C53: redefinition of '_nop_': different return types UART-EEPROM.c(402): error C25: syntax error near 'if' UART-EEPROM.c(402): error C25: syntax error near '!=' UART-EEPROM.c(402): error C25: syntax error near '[' UART-EEPROM.c(402): error C25: syntax error near ']' UART-EEPROM.c(403): warning C194: obsolete declaration: use '<type> data status' UART-EEPROM.c(404): error C25: syntax error near '}' UART-EEPROM.c(406): error C25: syntax error near '++' UART-EEPROM.c(406): error C7: compilation aborted UART-EEPROM.c - 20 Error(s), 7 Warning(s).
最新发布
09-09
pwm.c(24): error C142: illegal initialization pwm.c(25): warning C34: 'PID_object': missing declaration specifiers pwm.c(25): error C42: 'PID_object': not in formal parameter list pwm.c(25): error C25: syntax error near 'jiaodu_a' pwm.c(25): error C142: illegal initialization pwm.c(26): warning C34: 'PID_object': missing declaration specifiers pwm.c(26): error C42: 'PID_object': not in formal parameter list pwm.c(26): error C25: syntax error near 'sudu_b' pwm.c(26): error C142: illegal initialization pwm.c(29): error C42: 'jiaosudu': not in formal parameter list pwm.c(29): error C25: syntax error near '{' pwm.c(73): error C42: 'encoder_avg': not in formal parameter list pwm.c(74): error C42: 'last_filtered_encoder': not in formal parameter list pwm.c(75): error C142: illegal initialization pwm.c(75): error C53: redefinition of 'last_filtered_encoder': different basic types pwm.c(78): error C142: illegal initialization pwm.c(78): error C67: 'target_speed': undefined identifier pwm.c(78): error C67: 'sudu_b': undefined identifier pwm.c(78): warning C140: 'PID_position' undefined; assuming 'extern int PID_position()' pwm.c(80): error C25: syntax error near 'return' pwm.c(80): warning C34: 'pid_out': missing declaration specifiers pwm.c(81): error C25: syntax error near '}' pwm.c(84): error C142: illegal initialization pwm.c(85): warning C34: 'int16': missing declaration specifiers pwm.c(85): error C42: 'int16': not in formal parameter list pwm.c(85): error C25: syntax error near 'sudu_smoother' pwm.c(85): error C25: syntax error near 'LastspeedPWM' pwm.c(86): error C42: 'sudu_smoother': not in formal parameter list pwm.c(90): warning C34: 'PeriodCount': missing declaration specifiers pwm.c(90): error C42: 'PeriodCount': not in formal parameter list pwm.c(118): warning C34: 'aim_turn': missing declaration specifiers pwm.c(118): error C42: 'aim_turn': not in formal parameter list pwm.c(118): warning C34: 'turn_Kd': missing declaration specifiers pwm.c(118): error C42: 'turn_Kd': not in formal parameter list pwm.c(119): error C25: syntax error near 'return' pwm.c(119): warning C34: 'turn_out': missing declaration specifiers pwm.c(119): error C53: redefinition of 'turn_out': different basic types pwm.c(120): error C25: syntax error near '}'
07-14
void zb_ReceiveDataIndication( uint16 source, uint16 command, uint16 len, uint8 *pData ) { HalLedSet( HAL_LED_1, HAL_LED_MODE_OFF ); //关闭D7 HalLedSet( HAL_LED_1, HAL_LED_MODE_BLINK ); //使D7闪烁 if (strncmp("0x131 ON", pData, len) == 0) { //如果收到的数据是"0x131 ON" HalLedSet( HAL_LED_2, HAL_LED_MODE_ON ); //打开D6 } else if (strncmp("0x131 OFF", pData, len) == 0) { //如果收到的数据是"0x131 OFF" HalLedSet( HAL_LED_2, HAL_LED_MODE_OFF ); //关闭D6 } }Building configuration: NetworkTopology-Star - MPEndPoint Updating build tree... MPEndPont.c Warning[Pe047]: incompatible redefinition of macro "CLKSPD" (declared at line 166 of "C:\Texas Instruments\ZStack-CC2530-2.4.0-1.4.0\Components\hal\target\ C:\Texas Instruments\ZStack-CC2530-2.4.0-1.4.0\Projects\zstack\Samples\NetworkTopology-Star\Source\MPEndPont.c 108 CC2530EB\hal_mcu.h") Warning[Pe167]: argument of type "unsigned char *" is incompatible with parameter of type "char const *" C:\Texas Instruments\ZStack-CC2530-2.4.0-1.4.0\Projects\zstack\Samples\NetworkTopology-Star\Source\MPEndPont.c 546 Warning[Pe167]: argument of type "unsigned char *" is incompatible with parameter of type "char const *" C:\Texas Instruments\ZStack-CC2530-2.4.0-1.4.0\Projects\zstack\Samples\NetworkTopology-Star\Source\MPEndPont.c 548 Linking Warning[w69]: Address translation (-M, -b# or -b@) has no effect on the output format 'debug'. The output file will be generated but noaddress translation will be performed. Total number of errors: 0 Total number of warnings: 4
06-11
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值