In C++ classes, why the semi-colon after the closing brace? I regularly forget it and get compiler errors, and hence lost time. Seems somewhat superfluous to me, which is un
I do not use such declarations
class MyClass { . . . } MyInstance;
But in this case I can understand why is semicolon there. Because it is like int a; - variable declaration.
int a;
Probably for consistence as you can omit 'MyInstance' semicolon stays there.