C에서 [] []와 b [] []가 입력이고 x [] []가 출력입니다. a, b 및 x는 malloc되었지만 포인터를 곱하기 함수에 올바르게 전달하는 방법을 잘 모르겠습니다. 아래 당신이 void multiplication(float *a, float *b, float *x, int n);
을 원하는동적 2D 배열을 함수로 전달합니다.
void multiplication(float a, float b, float x, int n);
void main() {
float **a, **b, **x;
int n; // size of arrays (n x n)
multiplication(a, b, x, n);
}
void multiplication(float a, float b, float x, int n) {
// function
}