我有这些错误和警告......我对编程很陌生,我不知道这意味着什么。你们能看看这个并告诉我我做错了什么吗?
提前致谢
错误和警告:
Looplicht v2.0.c:226:警告:(361)函数声明为隐式int Looplicht v2.0.c:237:错误:(984)类型重新声明 Looplicht v2.0.c:237:错误:(1098)变量“integer_reverse”的声明冲突(Looplicht v2.0.c:237)
有错误的代码(我已将错误的行号放在描述中):
void mode_single_right() {
output_integer = 0x0001; //start right
for (unsigned char i = 0; i < number_of_outputs; i++) {
if (jump) {
jump = 0;
output_integer = integer_reverse(output_integer); //line 226
switch_outputs(output_integer);
output_integer = (output_integer << 1);
} else {
i--;
}
}
}
unsigned int integer_reverse (unsigned int input_br) { //line 237
unsigned int output_br = 0;
bit bit_in_reverse = 0;
for (unsigned char ibr = 0; ibr < 16; ++ibr) {
bit_in_reverse = input_br & 0x01;
output_br |= bit_in_reverse;
input_br >>= 1;
output_br <<= 1;
}
return output_br;
}