1
#include "windows.h"

namespace Hello {
  enum class PARITY {
    PARITY_NONE = 0U,
    PARITY_ODD = 1U,
    PARITY_EVEN = 2U,
  };
}

int main(){
    return 0;
}

So, the above code fails with the following errors enter image description here

and I think the reason is windows.h has definitions for symbols PARITY_NONE and the remaining. I'm failing to understand why there is a clash when I kept my enums in a different namespace. Any help will be greatly appreciated.

Arcaniaco
  • 400
  • 2
  • 10
thumala manish
  • 198
  • 1
  • 10

0 Answers0