R
Rafal 'Raf256' Maj
Hi,
how can I make operator that will automaticly converse tMyEnum into char,
typedef enum { ... } tMyEnum;
void Fun(char c) { ... }
tMyEnum e;
Fun( e );
so that the last line - function call can be more natural then:
Fun( (tMyEnum)e );
is converting enum into class the only possibility for doing so, assuming
that I do NOT want to overload Fun() with Fun(tMyEnum e) - because there
are several functions, with more arguments etc.
how can I make operator that will automaticly converse tMyEnum into char,
typedef enum { ... } tMyEnum;
void Fun(char c) { ... }
tMyEnum e;
Fun( e );
so that the last line - function call can be more natural then:
Fun( (tMyEnum)e );
is converting enum into class the only possibility for doing so, assuming
that I do NOT want to overload Fun() with Fun(tMyEnum e) - because there
are several functions, with more arguments etc.