abort() calling pointer array error
<pre><code>int main(){

vector &lt;string&gt; v;

std::ifstream input("data.txt");
std::string line;
</code></pre>

<p>reading data from a text file
file contain rows of data each row contain 1 argument 4 rows collectively make a student data</p>

<pre><code>while( std::getline( input, line ) ) {
    v.push_back(line);
}
int k = 0, count = 0;
int size = v.size() / 4;
Student **temp;
temp = new Student*[size];
string name, ID, department, CGPA;
</code></pre>

<p>here i am reading vector and creating a new object of student here</p>

<pre><code>for (int i = 0; i &lt; v.size();++i)
{
    if (k == 0)
    {
        name = v[i];
    }
    if (k == 1)
    {
        ID = v[i];
    }
    if (k == 2)
    {
        department = v[i];
    }
    if (k == 3)
    {
        CGPA = v[i];
        k = 0;
</code></pre>

<p>here it get crashed</p>

<pre><code>        temp[count] = new Student(name, stof(ID.c_str()), department, stof(CGPA.c_str()));
        temp[count]-&gt;print();
        count++;
        //cout &lt;&lt; name &lt;&lt; "\t" &lt;&lt; ID &lt;&lt; "\t" &lt;&lt; department &lt;&lt; "\t" &lt;&lt; CGPA &lt;&lt; endl;
        //break;
    }
    k++;

}

system("pause");

 }
</code></pre>