Quote Originally Posted by talentspsp View Post
For C++ programmers, if a function needs to return a value to indicate MULTIPLE status, such like success and different situations of failure(more than one, so can't return bool), what value should be returned to indicate success in "c++ standard"? Is there such standard?
You can use an enum, but you'll have to be careful to prevent name clashes, since the values defined in an enum are identifiers in the same scope as the enum. To prevent this, you could use http://www.boost.org/doc/libs/1_46_1..._emulation.hpp.
Code:
enum ReturnValue {
    Success,
    Failure1,
    Failure2
};
ReturnValue foo();