title: Conflicting types for "free"
body: <p>I'm getting the error</p>
  
  <blockquote>
    <p>Conflicting types for 'free'</p>
  </blockquote>
  
  <p>on the call to <code>free()</code> function below.</p>
  
  <pre><code>int main ( )
  {
      char fx [] = "x^2+5*x-1";
      node * fxNode = buildTree(fx, sizeof(fx)/sizeof(char));
      printf(deriveFromTree(fxNode)); // Should print "2*x+5"
      free(fxNode);
      return 0;
  }
  </code></pre>
  
  <p>Can't figure out why. Not sure if this matter, but what's above it is</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  char opstack [5] = {'+','-','*','^', '\0'};
  
  unsigned short int lowerOpPrecedence ( char, char, char * );
  
  int stringToUnsignedInt ( char *, unsigned int * );
  int stringToDouble ( char * , double * );
  unsigned short int stringCompare ( char * , char * );
  void stringCopy ( char * , char * );
  
  typedef struct treeNode
  {
      char * fx;
      char * op;
      struct treeNode * gx;
      struct treeNode * hx;
  } node;
  
  
  unsigned short int getNodeState ( node * );
  node * buildTree ( char *, int );
  char * basicDerivative ( char * );
  char * derivateFromTree ( node * );
  </code></pre>
  
  <p>and what's below it is a bunch of function implementations. </p>