I have come across some c code where the there is an enum type followed by a function implementation, such as this:
enum OGHRet funcX ( OGH *info, void *data, int size )
{
/* c code that does stuff here */
}
I am confused over how this enum statement works inline with the function implementation.
I assume it is the return type of funcX, but why is declared explicitly with enum?
Thanks in advance.
its just saying its returning an enum called OGHRet which will be defined elsewhere.
Here’s a fragment of code that shows enums and functions that return enums side by side…