dimanche 1 mars 2015

Why do we need semicolon before closing brace?


In C++, why do we need semicolon before closing brace? It's strange that something like



{
statement;
statement;
statement
}


is not possible, that semicolon not only delimiter statements. I understand that semicolon after class definition is necessary because there may be a definition of objects of this class. But what's up here?




Aucun commentaire:

Enregistrer un commentaire