title: In a C++ class, do you have to initialize member variables that are arrays?
body: <p>For example:</p>
  
  <pre><code>class Cls
  {
  private:
      int x;
      int y;
      int arr[10];
  
  public:
      Cls();
  };
  
  Cls::Cls() : x(0), y(0) {}
  </code></pre>
  
  <p>My understanding is that an uninitialized array will have garbage values. As long as I don't write code that expects the array to have a specific value before filling it, is there any issue with not initializing the array? Or do I need something like this as the constructor:</p>
  
  <pre><code>Cls::Cls() : x(0), y(0), arr() {}
  </code></pre>