title: Typedef struct pointer to function (C)
body: <p>I am trying to pass a typedef struct pointer to a function and the compiler is complaining with this error message: <strong>error: unknown type name ‘RootP’.</strong> Here is the code...</p>
  
  <pre><code>int main()
  {
      typedef struct Root
      {
          struct Root *child;
      }*RootP;
      RootP rootNode = malloc(sizeof(struct Root));
      rootNode-&gt;child = NULL;
      ....
  
  }
  
  void mkdir(RootP rootNode, char param2[60], char pwd[200])
  {
      ...
  }
  </code></pre>