you can use vector from the Standrad library to store your matrix in a variable way.
Then you defined your function to initiliaze it to 0
void fill_zero( std::vector<std::vector<float>> &matrix, int row, int column)
for(int i = 0; i<row; ++i)
this fill a row x column matrix with 0. As matrix is passed by reference (& matrix) you need a c++11 compiler (I think). Same for the 'auto' keyword.
then you just need to create the matrix before calling the function
//this is just for printng the matrix to see if it match your requirement !
for(auto vector : matrix)
for(auto value : vector)
I didn't test this an my own compiler, but it works here :
C++ Shell compiler with the code above, if you want to test it ! (it fill it with ones instead of zeroes, it's just to be sure that the compiler doesn't initiliaze value of vector to 0 by default. That way I am sure that the function work as we want to)