What does reinterpret_cast<char *>(&st) and (-1)*static_cast<int> mean?
<p>The code here is being used for creating a Student Report card project. While trying to understand we can not figure out the use of and functions of the below code:  </p>

<pre><code>File.read(reinterpret_cast&lt;char *&gt; (&amp;st), sizeof(student));

int pos=(-1)*static_cast&lt;int&gt;(sizeof(st));
</code></pre>

<hr>

<pre><code>File.read(reinterpret_cast&lt;char *&gt; (&amp;st), sizeof(student));
if(st.retrollno()==n)
    {
    st.showdata();
    cout&lt;&lt;"\n\nPlease Enter The New Details of student"&lt;&lt;endl;
        st.getdata();
            int pos=(-1)*static_cast&lt;int&gt;(sizeof(st));
            File.seekp(pos,ios::cur);
            File.write(reinterpret_cast&lt;char *&gt; (&amp;st), sizeof(student));
            cout&lt;&lt;"\n\n\t Record Updated";
            found=true;
    }
</code></pre>