+ 1

Do all classes in C++ end with ; after the closing curly brace?

I'm learning about C++ and notice that a semicolon is used periodically after a closing curly brace. I Dont think I've seen it applied to closing curly brace of functions just after closing curly brace of class declarations.

29th Dec 2019, 5:06 PM
K3NJ!B☆B¥
K3NJ!B☆B¥ - avatar
1 Resposta
+ 6
Yeah, classes are like declarations, so they get a semicolon. like: char c[] = { 'a', 'b', 'c' };
29th Dec 2019, 5:10 PM
HonFu
HonFu - avatar