is there a way to create a set of elements and then check if some variable belongs to this set.
e.g.
this doesn't work of course, as xxx is only kind of type punct and can be ASSIGNED ONE of the values of punct, but is not really a set of all of them.
so
what is the correct syntax?
is it possible at all?
thank you.
Avendeval
e.g.
Code:
enum punct{'.', ','};
punct xxx;
if(a!=xxx)
//...
this doesn't work of course, as xxx is only kind of type punct and can be ASSIGNED ONE of the values of punct, but is not really a set of all of them.
so
what is the correct syntax?
is it possible at all?
thank you.
Avendeval