Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
There are many C++ books for starters. I would
recommend to start with a book you just like the writing style of. However,
there are many programming books out there that get you into bad habits. When
selecting for a book, pay attention to the following:
- It should use 'int main' instead of 'void main' [1-5]
- It should use 'string', instead of 'char *' [6-10]
- It should use 'vector', instead of arrays [6-10]
- It should use 'cout', instead of 'printf' (which is an unsafe C function)
- It should not encourage the use of macro's [11,12]
- It should encourage the use of const[13-17]
A book that does all of the above is 'Thinking C++' by Bruce Eckel, can be downloaded for free. Try Google!
When getting the hang of programming and wondering
about 'good practices', 'good naming conventions' and so on, I strongly
recommend 'C++ coding standards: 101 rules, guidelines, and best practices'[6].
Put it under your pillow, read some pages once in a while and gain huge
benfits.
To deepen your knowledge about C++, I'd recommend 'The C++ Programming Language' [10] from Bjarne Stroustrup.
To improve you class design using design patterns, I'd recommend the book 'Design Patterns' [18].
To deepen your insight about the philosphy behind C++, read 'The design and evolution of C++' [19], also from Bjarne Stroustrup.
The most important C++ books ...ever
The most important C++ books are (according to [20]):
External links
- C++. International Standard. ISO/IEC 14882. Second edition. Paragraph 3.6.1.2
- From http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.3:
- Herb Sutter. Exceptional C++. ISBN:0-201-61562-2. Item 21: void main() is nonstandard and nonportable.
- From Bjarne Stroustrup's homepage (http://www.research.att.com/~bs/bs_faq2.html#void-main):
- From the The alt.comp.lang.learn.c-c++ FAQ: http://ma.rtij.nl/acllc-c++.FAQ.html#q3.4: 3.4: Why does everyone make so much fuss about "void main()"?
Because the return type of the main() function must be int in both C and C++. Anything else is undefined. Bottom line - don't try to start a thread about this in alt.comp.lang.learn.c-c++ as it has already been discussed many, many times and generates more flamage than any other topic.
|
- Herb Sutter and Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Chapter 77: 'Use vector and string instead of arrays
- Bjarne Stroustrup. The C++ Programming Language (3rd edition).ISBN: 0-201-88954-4
- Herb Sutter and Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6, chapter 76: 'Use vector by default. Otherwise, choose an appropriate container', chapter 77: 'Use vector and string instead of arrays.'
- Marshall Cline, Greg Lomow and Mike Girou. C++ FAQs. ISBN:0-201-3098301, FAQ 28.02: 'Are arrays good or evil?' (Answer: 'Arrays are evil')
- Bjarne Stroustrup. The C++ Programming Language (3rd edition).ISBN: 0-201-88954-4 Chapter C.14.11 'Prefer vector over array'
- Bjarne Stroustrup. The C++ Programming Language (3rd edition).ISBN: 0-201-88954-4, chapter 7.9.4: 'Avoid macros'
- Herb Sutter and Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Chapter 16: 'Avoid macros'
- Bjarne Stroustrup. The C++ Programming Language (3rd edition).ISBN: 0-201-88954-4 7.9.3: 'Use const extensively and consistently'
- Scott Meyers. Effective C++ (3rd edition).ISBN:0-321-33487-6. Item 3: 'Use const whenever possible'
- Jarrod Hollingworth, Bob Swart, Mark Cashman, Paul Gustavson. Sams C++ Builder 6 Developer's Guide. ISBN:0-672-32480-6. Chapter 3: 'Understand and use const in your code'
- Jesse Liberty. Sams teach yourself C++ in 24 hours. ISBN:0-672-32224-2. Hour 8, chapter 'Const member functions': 'Use const whenever possible.'
- Scott Meyers. Effective C++ (3rd edition).ISBN:0-321-33487-6. Item 2: 'Prefer consts, enums and inlines to #defines'
- Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. Design Patterns. (1st edition) 1995. ISBN: 0201633612
- Bjarne Stroustrup. The Design and Evolution of C++ ISBN: 0-201-54330-3
- Scott Meyers. The most important C++ books ...ever. 2006. Online at: http://www.artima.com/cppsource/top_cpp_books.html
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
