title: Declare a struct in C without defining it
body: <p>I'd like to declare a struct in C without defining it at the same time (i.e. to separate interface and implementation) so others can include this in their projects and define it to their needs (it is only used as a parameter in my code). Thus, I'd like to know if this is:</p>
  
  <p>A) Possible (maybe just using macros)?</p>
  
  <p>B) Considered good practise (in my particular circumstance)?</p>
  
  <p>B would be hard to answer without context (and is still subjective) so I'd only like it examined against any common pre-existing patterns in C for addressing the given context (if any). I have the following code: </p>
  
  <pre><code>typedef struct {
      bool logged_in;
  } Foo;
  </code></pre>
  
  <p>That I would like as this (pseudo code):</p>
  
  <pre><code>typedef struct Foo;
  </code></pre>
  
  <p>So this declaration can then be defined by the person who is including this in their project. In my code I am only using it as a parameter without trying to access the properties it contains, like so:</p>
  
  <pre><code>bool bar(Foo* foo) {
      //...
  }
  </code></pre>
  
  <p>Thanks.</p>