read a constant name from a file
Hi everyone,
I'm trying to read a settings file for a program i'm working on. This settings file is something like this:
option1=asdf
option2=5
option3=CONSTANT_X
where CONSTANT_X is a string too.
There is no problem about reading the numbers or strings from the program but, how can i read CONSTANT_X and use it as a constant in my program?
what i mean is to use it as:
int number=CONSTANT_X; (for example)
how can i interpret the constant from a string?? I don't know if i'm explaining it right :)
thanks!!