(C++) syntax error
February 24, 2017 · View on GitHub
(C++) syntax error
A syntax error is ...
Advice
- Forgetting the semicolon at the end of a class definition is a syntax error [3]
- Placing a semicolon immediately after the right parenthesis after the condition in an if statement is often a logic error, although not a syntax error [2]
References
- Paul Deitel, Harvey Deitel. C++11 for programmers (2nd edition). 2014. ISBN: 978-0-13-343985-4. Chapter 3.1, Common Programming Error 3.1. page 39: 'Forgetting the semicolon at the end of a class definition is a syntax error.'
- Paul Deitel, Harvey Deitel. C++11 for programmers (2nd edition). 2014. ISBN: 978-0-13-343985-4. Chapter 2.6, Common Programming Error 2.4. page 34: 'Placing a semicolon immediately after the right parenthesis after the condition in an if statement is often a logic error (although not a syntax error)'