【发布时间】:2011-01-29 19:31:59
【问题描述】:
我正在做一个程序,这并不重要。显然,我无法将参数发送到浮点函数。 代码看起来像这样
float myfunction(float array[1][2])
{
// ...
return 0;
}
int main()
{
float array[1][2];
int foo = 0;
// assigning values to the array
foo = myfunction(array[1][2]);
return 0;
}
当我尝试编译时,我收到错误“无法将参数 1 从 'float' 转换为 'float [][2]” 怎么了?我该如何解决?
【问题讨论】:
-
好的,我明白我的错误了。感谢您的帮助!