title: Returning an enum from a function in C?
body: <p>If I have something like the following in a header file, how do I declare a function that returns an enum of type Foo?</p>
  
  <pre><code>enum Foo
  {
     BAR,
     BAZ
  };
  </code></pre>
  
  <p>Can I just do something like the following?</p>
  
  <pre><code>Foo testFunc()
  {
      return Foo.BAR;
  }
  </code></pre>
  
  <p>Or do I need to use typedefs or pointers or something?</p>