 <blockquote> <p>how vecor is initialised?</p> </blockquote> <p>It's default initialized implicitly (i.e. initialized by the default constructor). To be complete, it's default initialized at first, and then copy assigned in the body of constructor.</p> <p>The more effiient way is using <a href="http://en.cppreference.com/w/cpp/language/initializer_list" rel="nofollow">member initializer list</a>.</p> <pre><code>class Student : public Person { private: vector&lt;int&gt; testScores; public: Student(string firstname, string lastname, int id, const vector&lt;int&gt;&amp; scores) :Person(firstname, lastname, id), testScores(scores) { } ... }; </code></pre> <p>It's copy initialized now (i.e. initialized by the copy constructor).</p>