I have a problem putting method args to my class:
class A {
public:
enum Mode {ModeA, ModeB, ModeC};
... // other methods, constructor etc
void setMode(Mode m) {
mMode = m;
}
private:
Mode mMode;
}
int main(int argc, char **argv) {
A a;
a.setMode(A::ModeA | A::ModeC );
return 0;
}
The problem, I get a C++ compiler error invalid vconversion from int to A::Mode
,
I dont understand, why I can't concat to enum values? I need to concat values in my
code, so any help to solve this would be very nice.