unsigned int zu size_t geändert (matrix.c)

This commit is contained in:
Laila Mueller 2025-11-10 15:06:50 +01:00
parent 24f547ccec
commit 150cce7f8c

View File

@ -61,8 +61,8 @@ Matrix add(const Matrix matrix1, const Matrix matrix2)
}
Matrix result = createMatrix(matrix1.rows, matrix1.cols);
for (unsigned int i = 0; i < matrix1.rows; i++) {
for (unsigned int j = 0; j < matrix1.cols; j++) {
for (size_t i = 0; i < matrix1.rows; i++) {
for (size_t j = 0; j < matrix1.cols; j++) {
MatrixType sum = getMatrixAt(matrix1, i, j) + getMatrixAt(matrix2, i, j);
setMatrixAt(sum, result, i, j);
}