title: Initialize an array inside Constructor in C++
body: <p>I have defined an array within a class. I want to initialize the array with some values pre-decided value. If I could do it in definition only then it will be easier as I would have used</p>
  
  <pre><code>class A{
      int array[7]={2,3,4,1,6,5,4};
  }
  </code></pre>
  
  <p>But, I can't do that. This, I need to do inside Constructor. But I can't use the same above syntax as it would create a new array inside Constructor and won't affect the array defined in class. What can be the easiest way to do it?</p>
  
  <pre><code>class A{
      public:
      int array[7];
      A::A(){
  
      }
  }
  </code></pre>