Enumeraters?

In a C++ book I'm reading it has an example where an enumeration is used to return an error report of SUCCESS or ERROR in a function. Can anyone explain to me what an enumerator is?

Here's the code for the function prototype:

1
2
3
enum ERR_CODE { SUCCESS, ERROR };

ERR_CODE Factor(int, int&, int&);
I believe that an enumeration is basically a user defined type, where it can have one of the given values. By creating an object of that type, its variables can take on one of the values in the enumeration's list of values.
In that particular case returns of true and false would be just as effective though.
Thanks both of you, I understand now.
Topic archived. No new replies allowed.