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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -