title: Conflicting types for function in C
body: <p>I have written a pop function that pops a linked list stack of character operators (+, *, - , /) and returns the value popped. The problem is I am getting a "conflicting types error". And I can't seem to figure out whats wrong. My linkedCharStack struct is declared as:</p>
  
  <pre><code>typedef struct linkedcharStack
  {
  char elem;
  struct linkedcharStack* next;
  };
  </code></pre>
  
  <p>The head of the stack is declared in another function outside of pop(not global but pointer) as:</p>
  
  <pre><code>struct linkedcharStack * opstack = malloc(sizeof(struct linkedStack));
  </code></pre>
  
  <p>And my actual pop function is:</p>
  
  <pre><code>char poptheop(struct linkedcharStack* s1){
  struct linkedcharStack* temp;
  if(s1==NULL){
      printf("NULL TOP ON POP VALUE STACK!");
  
  }
  char returnvalue = s1-&gt;elem;
  temp = s1;
  s1 = s1-&gt;next;
  free(temp);
  return returnvalue;
  }
  </code></pre>