title: Using char* or char [] in struct C++
body: <p>I am creating a <code>struct</code> called <code>student</code>. In order to store the name, is there anything wrong with just declaring a <code>char</code> pointer in the <code>struct</code> instead of a <code>char</code> array with a predefined size? I can then assign a string literal to the <code>char</code> pointer in the main code.</p>
  
  <pre><code>struct student
  {
      int ID;
      char* name;
  };
  </code></pre>