Good evening! I'm having a question about how to copy a vector.
I declare a vector "matrix [a] [j]" and I need to take the arithmetic mean only of the values contained in "array [a]", so I need to make a copy only of the values "[a]" for an auxiliary vector , and I can not. I created a function that makes the copy of the matrix to another, but this one giving error because the main vector is different from the auxiliary one.
Here is the code for the copy function:
void copiaMatriz (int matriz[], int vetorAux[]){
int count;
for(count = 0; count < LINHA; count++)
vetorAux[count] = matriz[count]; }
How do I declare the parent array so that it copies only the elements contained in "[a]"?
Thank you.