johnwasser:
It also compiles if you change:void doJohn( John & j1){ int i=j1.a; }to
void doJohn(class John & j1){ int i=j1.a; }This trick works for 'struct' so I gave it a try with 'class' and it worked. Probably works with 'enum', too.
Oh that's a great point. I should have tried that myself!
Cheers,
John