title: Using strings or pointers to strings in struct
body: <p>I think I am missing something critical and I can't find an answer. If I want to use string in struct, is it better to use char arrays or pointers to them?
  Following code works as intended, but raises warnings
  &quot;Warning    C4047   'function': 'const char <em>' differs in levels of indirection from 'char (</em>)[3]&quot;</p>
  <p>when used with following definition of struct</p>
  <pre><code>typedef struct element {
      char name[20];
      char symb[3];
      double wt;
  }element;
  </code></pre>
  <p>And following procedure for creating element</p>
  <pre><code>element e;
  char name[20];
  char symbol[3];
  scanf(&quot;%s %s %lf&quot;, &amp;name, &amp;symbol, &amp;e.wt);
  strcpy(&amp;e.name, &amp;name);
  strcpy(&amp;e.symb, &amp;symbol);
  </code></pre>