Multiple instances of an enum inside an enum
#1

Alright, experimenting a bit but not really sure where to start. I'm wanting to create 5 instances of an enum inside of another enum for the sake of being organized.

Per-example, this is what I'm wanting to do. Now I know this naturally should return an error but bear in mind, this was only written as an example to help you understand the idea.
Code:
enum IDs_Enum // The enum I'd like to duplicate
{
	MyID,
	YourID,
	OtherGuysID
}
enum Base_Enum
{
	IDs_Enum[5], // Duplicating the enum 5 times per each Base_Enum instance
	OtherData,
	MoreData
}
new B_Enum[15][Base_Enum]

-------------------------------
error 021: symbol already defined: "IDs_Enum"
So whats the souce for this recipe guys?
Reply
#2

I think that you can't do what you want to do. I mean i think that it's imposible.
Reply
#3

Well, that's what I've been told but it doesn't hurt to poke around a bit. Who knows, someone might have something clever up their sleeve.
Reply
#4

Page 5, throwing this back into circulation.
Reply
#5

You want something like this:
Code:
enum IDs_Enum // The enum I'd like to duplicate
{
	MyID,
	YourID,
	OtherGuysID
}
enum Base_Enum
{
	we[IDs_Enum][5], // Duplicating the enum 5 times per each Base_Enum instance
	OtherData,
	MoreData
}
new B_Enum[15][Base_Enum];
but you cant,
B_Enum[0][we][MyID][0] = 5;
will be a 4-D array and you can have at max 3d arrays.

Code:
enum Base_Enum
{
	we[IDs_Enum], // Duplicating the enum 5 times per each Base_Enum instance
	OtherData,
	MoreData
}
is valid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)