- Modern C++:Efficient and Scalable Application Development
- Richard Grimes Marius Bancila
- 92字
- 2021-06-10 18:27:50
Writing Statements
A statement can be a declaration of a variable, an expression that evaluates to a value, or it can be a definition of a type. A statement may also be a control structure to affect the flow of the execution through your code.
A statement ends with a semicolon. Other than that, there are few rules about how to format statements. You can even use a semicolon on its own, and this is called a null statement. A null statement does nothing, so having too many semicolons is usually benign.