3

I was looking at the value of SOCK_DGRAM which is defined in /bits/socket.h of glibc.

My question is that if I have a simple enum like:

enum my_enum {
    SOME_VALUE = 1,
#define SOME_VALUE SOME_VALUE
    ANOTHER_VALUE = 2,
#define ANOTHER_VALUE ANOTHER_VALUE
}

What is the purpose of using #define macros in this case?

Akshdeep Singh
  • 1,301
  • 1
  • 19
  • 34

0 Answers0