此处定义的数组,在下面供函数调用,编译总是出错,尝试了很多办法还是不行,希望高手能指点一下~~~~~如果要能正常调用该数组,该如何改正或者用其他办法如何实现?小弟不甚感激~~~~
unsigned char Inputdata_1[251574]
void Display(int addr) //此处改成过指针的形式,但是后面没改,编译依然无法通过 { int_t i,j; int_t a,b; TempBuffer_img[j] = addr[i*960+j+54];
}
void mian() { Display(Inputdata_1)
}
附:编译错误提示
"main.c", line 53: cc0142: error: expression must have pointer-to-object type TempBuffer_img[j] = addr[i*960+j+54]; ^
编译软件对此错误的解释:
Compiler Error: expression must have pointer-to-object type
Description
The expression used does not have a pointer-to-object type.
Severity
Fatal error
Recovery
The compiler cannot recover from this error.
Example
int a;
int main() { return a[1]; /* Error occurs here */ }
How to Fix
Ensure that the expression used has a pointer-to-object type. The lvalue must be for a scalar, and if it is a pointer, it must point to an object.
One of the operands must have a pointer-to-object type, and the other one must be an integral expression. You can make the above example compile by either changing the declaration "int a;" to "int a[];" or by changing the return statement to "return a".
|