I've witnessed today a form of enum
that was written as such, compiled under VS 2017:
enum ens en1, en2, en3;
and then it was used as such:
int n = en2;
So my question is, what form of enum
was it and why n
was later set to 0
?
enum ens en1, en2, en3;
int main()
{
int n = en2;
}
compiles without warning with the default compiler options