enum
s are constants so you can’t take it as n1::e1&
but as const n1::e1&
:
void f(const n1::e1& e) {
std::cout<<static_cast<int>(e);
}
CLICK HERE to find out more related problems solutions.
enum
s are constants so you can’t take it as n1::e1&
but as const n1::e1&
:
void f(const n1::e1& e) {
std::cout<<static_cast<int>(e);
}
CLICK HERE to find out more related problems solutions.