I finished it.
Instructions:Download the .zip file containing the source and header files for ConvertEnumToStrings from
this link.
Extract everything from the .zip to somewhere on your hard drive, being sure to retain the directory structures.
Add the sources and headers found in the "ConvertEnumToStrings" directory and all sub-directories to a new project file created in whatever IDE you use (I use Code::Blocks).
Make sure your IDE is set to link.
Build the project. It should compile without any errors.
You should now have an executable you can run from whatever target directory you compiled it in.
Now open up a Terminal or Command Prompt (depending on whether you're in Linux or Windows), or whatever name the command-line program is in your OS.
Through the command-line, navigate to the directory (using the "cd" command or similiar) the "ConvertEnumToStrings" executable is in.
Once there, run this if in Windows:
- Code:
ConvertEnumToStrings.exe --help
to get a description of how to use the program.
Or this if in Linux:
- Code:
./ConvertEnumToStrings --help
to get a description of how to use the program.
Read what it says and respond accordingly.
You should now be able to pass into the program an existing file with an enum in it, and have the program generate a header or source file (header by default) for you providing the method(s) to get different enum elements automatically, including the enum name, a vector<string> of all the enumerators' names, a vector<int> of the enumerators' values, a map<string, int> of all the enumerators mapped to their numerical values, or the number of enumerators.
Cheers.
Tue Mar 13, 2012 6:17 pm by Coolname007
» Adcted mu online
Mon May 09, 2011 1:15 am by Guest
» The Introduction Thread
Fri Apr 01, 2011 8:36 pm by Coolname007
» Count to one million!
Sat Mar 19, 2011 12:22 pm by Coolname007
» Funny Guy!
Wed Mar 02, 2011 11:25 pm by Coolname007
» China says police killed 12 in Urumqi rioting
Sun Feb 27, 2011 6:14 pm by fvwizard
» Arieth Mu Online
Fri Feb 18, 2011 2:46 pm by Coolname007
» MAW - Make A Website
Mon Feb 07, 2011 8:12 am by Coolname007
» AVACS LIVE CHAT free chat software for mobiles and computer
Tue Jan 25, 2011 2:19 pm by Coolname007