title: Is it possible to intialize array filled with zeros in member initializer list?
body: <p>I need to define an empty constructor of class Array, which has one argument that contains value of parameter m. It needs to allocate memory for m elements in an array and initialize it with zeros.</p>
  <pre><code>class Array{
  protected:
   int* data;
   int m;
  
  public:
   Array(int m);
  };
  </code></pre>
  <p>Is it possible to initialize it with zeros in member initializer list, or it can't be done except with a for loop in the body of this constructor. I defined this constructor like this:</p>
  <pre><code>Array::Array(int m):m(m),data(new int[m]){}
  </code></pre>
  <p>but of course its filled with random trash values leftover in the memory.</p>