【发布时间】:2011-12-16 04:04:43
【问题描述】:
我想在不知道其他任何事情的情况下找到矩阵的行数和列数。
例子:
int * findElements(int matInput[][]) {
/*Count blah*/
/*Now to run a loop till the number of rows*/
/*I need to know the size of the matrix to run the loop above*/
}
我无法运行循环来查找大小,因为我不知道何时终止,也不知道矩阵是否在创建时被初始化。 还有其他方法吗?
【问题讨论】: