I have two arrays declared:
Code:
float array1[rows][cols];
float *array2;
I fill array 2 with data and now I want to manipulate it in array 1 so I have:
Code:
for(i = 0; i < rows; i++){
for(j = 0; j < cols; j++){
array1[i][j] = array2[i][j]
}
}
I typed this and got the old Expression must be pointer-to-object type error.
So I tried:
Code:
for(i = 0; i < rows; i++){
for(j = 0; j < cols; j++){
array1[i][j] = &array2[i][j]
}
}
Same error so I tried:
Code:
for(i = 0; i < rows; i++){
for(j = 0; j < cols; j++){
array1[i][j] = *array2[i][j]
}
}
Same error... so how do I make this work?
Thanks your help