Raised This Month: $ Target: $400
 0% 

Converting enum elements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-08-2020 , 16:18   Re: Converting enum elements
Reply With Quote #1

I might not fully understand what you're trying to do, but what about this?

PHP Code:
new szEnumName[MyEnumThingy];

num_to_str(szEnumName[Red]); 
The only other option i could really think of is just creating 2D array for it and "hardcode" color names. (Could be fixed by using a simple text file though).
__________________

Last edited by Napoleon_be; 06-08-2020 at 16:19.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode