Due to how addressing works, you cannot just pass in a โcolumnโ, since the values โโof the โcolumnโ are actually stored in your โrowsโ. This is why your compiler will not allow you to pass the value in your link to "string", that is: "[]".
A simple solution would be to pass the entire matrix and pass the column index as a separate integer and number of rows. Your function can then iterate over each row to access all members of this column. i.e:
functionName(matrixType** matrixRef, int colIndex, int numRows)
{
for(int i=0; i< numRows; ++i)
matrixType value = matrixRef[i][colIndex];
}
source
share