Question about enums
#1

Ok, so... my two enums:

Код:
enum _enum { _id, _modelid, _x, _y, _z }

enum _enum1 { _x1, _y1, _z1, _interior }
Well, these '1' chars make things less clear. Is there are way to declare another enum with the same index names? Like this:

Код:
enum _enum { _id, _modelid, _x, _y, _z }

enum _enum1 { _x, _y, _z, _interior }
You might say its unknown thus, which index to take (2 or 0) when calling let's say:

Код:
arr[_x];
But hello,... I declare my arrays this way:

Код:
new arr[_enum];
new arr1[_enum1];
So maybe if it's possibe to describe, which exactly enum I'm using with a certain array, I should be allowed to use same enum indices, which means:

Код:
arr[_x]   same as    arr[2]
arr1[_x]    same as    arr1[0]
Thanks for your advice.
Reply


Messages In This Thread
Question about enums - by Baltazar - 08.04.2014, 01:59
Re: Question about enums - by Baltazar - 08.04.2014, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)