C++ constructor map object (Edited)
<p>I searched a lot but I couldn't find the answer of my question:</p>

<p>I have a class <strong>Student</strong> with lots of field so I don't want to use <strong>copy constructor</strong>.</p>

<p>I should save the data from a file into a map.</p>

<p>I read a line from file (all the student information saved in a line) and with a function (<strong>readLine</strong>) which is a public member of <strong>Student</strong> class, I decode the line and save it to current student:</p>

<pre><code>getline(in, line);//read a line
Student s;
s.readLine(line);//Decode the line and save it into s
</code></pre>

<p>I wrote before:</p>

<pre><code>map&lt;string, Student&gt; students; //map of student key=student ID.
</code></pre>

<p>When I use these lines an error will happen</p>

<p><code>students[Student::getID(line)]=Student(s);</code></p>

<p>or</p>

<pre><code>students[Student::getID(line)]=s;
</code></pre>

<p><strong>Exception Code:   c0000374</strong></p>

<p>Do you have any idea to solve this problem?</p>

<p>Thanks.</p>

<h2><strong>Edited</strong></h2>

<p>I tried to use the copy constructor but it didn't run:</p>

<pre><code>Student(const Student &amp;s){
     cout&lt;&lt;"COPY";
}
</code></pre>

<p>Calling:</p>

<pre><code>Student s;
s.readLine(line);
students[Student::getID(line)]=Student(s);
</code></pre>

<p>Destructor:</p>

<pre><code>~Student(){
..
.
delete [] exam;
.
}
</code></pre>