From string to Enum variable
#1

Is it possible to convert a string into a variable name?

PHP код:
enum info
{
    
Float:black1[3],
Float:black2[3],
    
Float:white1[3],
Float:white2[3],
}
new 
Maps[MAX_MAPS][info]; 
PHP код:
new GetRandomNumber(1,2);
Maps[id][black+r// How do I do this 
how can I make string like "black1" into the enum
Reply


Messages In This Thread
From string to Enum variable - by PeanutButter - 20.01.2017, 23:13
Re: From string to Enum variable - by AmigaBlizzard - 20.01.2017, 23:23
Re: From string to Enum variable - by iLearner - 20.01.2017, 23:43
Re: From string to Enum variable - by Dutheil - 21.01.2017, 06:16
Re: From string to Enum variable - by Vince - 21.01.2017, 09:41
Re: From string to Enum variable - by Dutheil - 21.01.2017, 09:51

Forum Jump:


Users browsing this thread: 2 Guest(s)