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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -