我有下面的函数声明没有呼叫匹配功能:常量指针的指针
int vectorQuantization(const Color **input, Color **output,
const int rows, const int cols, const int numColors);
,当我试图从我的主函数中调用它,我得到的错误“否调用“VectorQuantization匹配功能'“。
Color *input2quantize;
Color *outputQuantized;
...
...
vectorQuantization(&input2quantize, &outputQuantized, rows, cols, 10);
什么,我试图做的是使功能不变的输入,使其不能在函数内部进行修改,我还以为它声明为常量将使。 我在这里错过了什么?我正在考虑使用引用而不是指针指针,但我感到困惑。所以有两个问题:
- 我该如何解决这个错误?
- 使用引用而不是const指针指针会更好吗?
vectorQuantization((const的色彩和)input2quantize,与outputQuantized,(const int的)行,(const int的)的cols,(const int的)10); – Lefsler 2013-05-10 10:54:09