title: Stuck using an array in the constructor as a parameter
body: <p>I am new to this and I am having a problem. I want to use an array as a parameter in the constructor, but when I want to initialize the parameter in the <code>main()</code> function and call the class, it seems I can't directly put the array values as I did with the <code>name</code> and <code>surname</code>. The simplified code looks like below. It shows an error that the default constructor is not available.</p>
  <pre><code>class Student {
  private:
      string name;
      string surname;
      int age;
      int grade[5];
  public:
      Student(string e, string b, int c,int A[5]) {
          name = e;
          surname = b;
          age = c;
          for (int i = 0; i &lt; 5; i++)
              grade[i] = A[i];
  
      }
  };
  
  int main() {
      Student obj = Student(&quot;Jack&quot;,&quot;blalba&quot;, 18, {10,10,9,8,8});
  }
  </code></pre>