How do you change the value of a single member of a struct pointer?
<pre><code> #include &lt;iostream&gt;
 #include &lt;cstring&gt;
 using namespace std;

 struct Student {
     int no;
     char grade[14];
 };

 void set(struct Student* student);
 void display(struct Student student);

 int main( ) {
     struct Student harry = {975, "ABC"};

     set(&amp;harry);
     display(harry);
 }
 void set(struct Student* student){
     struct Student jim = {306, "BBB"};

     *student = jim; // this works
     //*student.no = 306; // does not work
 }
 void display(struct Student student){

     cout &lt;&lt; "Grades for " &lt;&lt; student.no;
     cout &lt;&lt; " : " &lt;&lt; student.grade &lt;&lt; endl;
 }
</code></pre>

<p>How can I change just one member of the structure with a pointer? Why does *student.no = 306 not work? Just a bit confused.</p>
