Question : filling 2d array with 0 c++
Answered by : wicked-willet-c5e1h20vcmxo
int a[x][y];
std::fill(a[0], a[0] + x * y, 0);
Source : https://stackoverflow.com/questions/3586774/fill-multidimensional-array-elements-with-0s#:~:text=For%20C%2B%2B%2C%20you%20can,%2B%20100%20*%20200%2C%200)%3B | Last Update : Wed, 17 Jun 20