I\'m having a problem with enumerators. Let\'s not waste anyone\'s time, and get straight to it. The error:
1> forgelib\\include\\forge\\socket.h(79): err
You cannot have equal names in old c-style enums. If you have C++11 - you can use enum class
, static constants in classes, different namespaces, or you can simply use different names.
Example with enum classes
enum class SocketType
{
RAW = SOCK_RAW
};
enum class ProtocolType
{
RAW = IP_PROTO_RAW
};
example with constants
struct SocketType
{
static const int RAW = SOCK_RAW;
};
struct ProtocolType
{
static const int RAW = IP_PROTO_ROW;
};