The question is pretty straight forward, How can I initialize a 2D dynamic array to zeros?
I can imagine that it can be done with a nested for loop, by changing every [i][j] pair to zero, is this the only way?
Yes that is the only way if you are using new
You might like using 2D vector initialized instead: std::vector< std::vector<int> > matrix(height, std::vector<int>(width, 0));