filling 2d dynamic array c++ code example Example: filling 2d array with 0 c++ int a[x][y]; std::fill(a[0], a[0] + x * y, 0);