I was wondering if one could write a function that could accept one or the other variable type.

ex: I have 2 arrays, int** and double**, and a function

Code:

void PGMWrite(double** Matrix, int Matrix_dimension){.....}

is there any way to change the function to

Code:

void PGMWrite(int** Matrix || double** Matrix, int Matrix_dimension){.....}

and then have some sort of type identifier in the function that picks the correct section via an if loop? If so how, and how would I identify in the function if the input it type double or int?