yes, an enumeration type is often returned.
You want to put your enum outside the class, although the function wants to use it. Or specify the type of the return name of the function with the class name (the enumeration should be in the open part of the class definition).
class myclass
{
public:
enum myenum{ a, b, c, d};
myenum function();
};
myClass::myenum function()
{
}
source
share