Appendix E: Common Mistakes


This appendix is provided to show you a number of mistakes that beginners commonly make. Hopefully, if you review this you will avoid some of these mistakes. At the very least, you may want to consult this appendix if you are trying to find some bug in your program.

The Missing Semicolon

All statements/expressions in C++ (as well as in Java and C) end with a semi- colon. If you leave that off, then the compiler tries to interpret the next line of code as being part of the line that is missing the semicolon. This can lead to a number of very strange error messages when you attempt to compile.




C++ Programming Fundamentals
C++ Programming Fundamentals (Cyberrookies)
ISBN: 1584502371
EAN: 2147483647
Year: 2005
Pages: 197
Authors: Chuck Easttom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net