Why There's Such a difference? [Enums]
#1

I would like to ask that why is there such a difference in enums in Pawn and C/C++? I heard that Pawn is made from C, then Why in Pawn we use 'Enums' as kind of Variables, but in C/C++ there's a big difference

In Pawn:

Код:
enum Person
{
   Money,
   Age
};

new hBeing[playerid][Person];

// then we use it as
hBeing[playerid][Money]=1000;
But in C++

Код:
enum Color
{
  red,
  green,
  blue
}

// then we use it as
Color x=red;// or enum Color x=red; (in C I think?)
Why is there so much difference, Or am I mistaken somewhere?
Reply


Messages In This Thread
Why There's Such a difference? [Enums] - by TheRaGeLord - 11.10.2015, 12:50
Re: Why There's Such a difference? [Enums] - by Infinity - 11.10.2015, 13:37
Re: Why There's Such a difference? [Enums] - by TheRaGeLord - 11.10.2015, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)