Enum
Can I use enum to define a set of variables and later have the compiler read them as a string and sum their values?? For example, If I have:
|
enum alph {A = '0', a = '0', T = '3', t = '3', B = '5', b = '5'}
|
then I have the user input
as a string, can I tell the compiler to add the value of the string??
Is it best to just use
#define
for this??
Also, this may be a stupid question, but can I define two vales at once??
i.e. #define A,a = 0
Topic archived. No new replies allowed.