title: how to insert a string in a linked list inserting function
body: <p>I want to insert a string into <code>struct data_node</code> in a function called <code>insert</code>. My <code>struct data_node</code> is </p>
  
  <pre><code>struct data_node {
     char name [25];
     int data;
     struct data_node *next;
     };
  </code></pre>
  
  <p>and my insert function is:</p>
  
  <pre><code>struct data_node * insert (struct data_node **p_first, int elem, char *word ) {
  
      struct data_node *new_node, *prev, *current;
      current=*p_first;
      while (current != NULL &amp;&amp; elem &gt; current-&gt;data) {
         prev=current;
         current=current-&gt;next;
      } /* end while */
  
      /* current now points to position *before* which we need to insert */
      new_node = (struct data_node *) malloc(sizeof(struct data_node));
      new_node-&gt;data=elem;
      new_node-&gt;name=*word;
  
      new_node-&gt;next=current;
      if ( current == *p_first ) /* insert before 1st element */
         *p_first=new_node;
      else                       /* now insert before current */
         prev-&gt;next=new_node;
      /* end if current == *p_first */
      return new_node;
  };
  </code></pre>
  
  <p>when I compile , it says that the line 22 incompatible types when assigning to type 'char[25]' from type 'char' that means <code>new_node-&gt;name=*word;</code> is wrong. how could I solve this problem?</p>