[问题] while的判断式里面有阵列无法跑

楼主: bjiyxo (若自礌)   2014-08-11 00:00:56
开发平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
问题(Question):
while里面有阵列没有办法跑
喂入的资料(Input):
预期的正确结果(Expected Output):
至少能编译QQ
错误结果(Wrong Output):
error C2664: 'int A(double [][2])' : 无法将引数 1 从 'double' 转换为
'double [][2]'
程式码(Code):(请善用置底文网页, 记得排版)
#include <stdio.h>
#include <stdlib.h>
int main(){
double C[2][2] = { 0. };
int A(double B[2][2]);
while (A(C[2][2])){
printf("good!");
}
system("pause");
return 0;
}
int A(double B[2][2]){
return 0;
}
补充说明(Supplement):
上面只是简单把我程式用到的问题简化,实际上上面程式没啥特殊意义...
作者: asilzheng (asil)   2014-08-11 00:05:00
C[2][2] 是 double ,C 才是二维阵列
楼主: bjiyxo (若自礌)   2014-08-11 00:24:00
感谢!
作者: putumaxally (putumaxally)   2014-08-11 02:19:00
int A(double B[2][2]); // 这是什么C++吗?
作者: suhorng ( )   2014-08-11 02:24:00
那个只是 prototype declaration
作者: putumaxally (putumaxally)   2014-08-11 02:27:00
我是智障...
作者: Killercat (杀人猫™)   2014-08-11 12:23:00
这种prototype也是很危险的写法...

Links booklink

Contact Us: admin [ a t ] ucptt.com