If I have something like the following in a header file, how do I declare a function that returns an enum of type Foo?
enum Foo { BAR, BAZ }; >
enum Foo { BAR, BAZ };
In C, the return type should have enum before it. And when you use the individual enum values, you don't qualify them in any way.
enum Foo testFunc() { enum Foo temp = BAR; temp = BAZ; return temp; }