C syntax understanding - parameter passing to function -


here header of function:

int* matrixmult(const int*ap[], const int* bp[], int* cp[]) 

and working call of function:

matrixmult(ap, bp, cp); 

why doesn't call work?:

matrixmult(ap[0], bp[0], cp[0]); 

why doesn't call work?:

matrixmult(ap[0], bp[0], cp[0]);

here, values (first item of array - int) passed function, while pointers expected:

int* matrixmult(const int*ap[], const int* bp[], int* cp[]) 

this:

matrixmult(ap, bp, cp); 

works because 3 pointers. ap same &ap[0].


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -