Enumerator question
#1

Can you have two or more enums with the same const name without any unwanted effects?
or
Would it be better to prefix them with something?

example:
Код:
enum e_MyEnum
{
    e_First,
    e_Test
}
new EnumTest[MAX_PLAYERS][e_MyEnum];

enum e_SecondEnum
{
    e_Test,
    e_Another
}
new AnotherEnum[MAX_PLAYERS][e_SecondEnum];

EnumTest[0][e_Test] = AnotherEnum[0][e_Test];
Reply
#2

Yes, you can. And I prefix enumerators with the initials of the enum in which they're defined:

Код:
enum E_PLAYER_DATA {

    epd_Something // epd = E_PLAYER_DATA
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)