Hi I really need help figuring this one out I have been working at it forever. I am trying to pass an array of 3 pointers, which are themselves arrays, and get the sum of the last two pointers and store it in the first pointer. The pointerarrays are filled with large integer numbers with each digit of the integer in a certain index of the array. What I am having trouble with is referencing a certain index within each array to add them together, being as the arrays themselves are index's of another array. Here is what I have so far.
pointerarray[1] = *oper1array; //Set integer arrays to indexs of
pointerarray[2] = *oper2array; //array to be passed to function
pointerarray[0] = *sumarray; //sum
void sum(int pointer[3], int N)
{
for(int i=0; i<N; i++)
pointer[0] = pointer[1] + pointer[2];
}
I know the for loop has no meaning as it is now, but it needs to and I don't know how to implement that. It should add the index values of pointer[1] and pointer[2] and place them in the same index values in pointer[0].