[Solved] Passing a matrix of structs to a function [duplicate]


A matrix is an array of arrays, so you could use a pointer to a pointer to mystruct, as well and the number of rows and columns so the function knows how to handle it:

void myfunction(mystruct** matrix, int rows, int columns) {
    // Your logic goes here...
}

3

solved Passing a matrix of structs to a function [duplicate]