BOOK / SOURCE & READING RECORD
Programming: Principles and Practice Using C++
Bjarne Stroustrup
2nd edition,2014年5月;作者公开章节含2015/2016修订页,未以第三版替代
Programming: Principles and Practice Using C++
Read all available text, code, Drill, Review, Exercises, terms/index of second edition chapters 0–27 and appendices A–E; among them chapters 1, 11, 22–25, 27 and Glossary were additionally read using the author's complete chapter PDFs. Author chapters total 294 printed pages; key missing pages, tables, and figures in chapters 11/22/23 have been supplemented by reading images. The remaining public full-book OCR still has damaged code and unrecovered graphics/tables, especially chapters 12–16 graphics and GUI, therefore it is not claimed that the original edition was read through without gaps in text and images; exercises were not run.
Edition, actual reading range, and original sources →Sources
- Author's second edition support page
Confirm 2014 second edition and textbook support resources
- Author's public second edition chapter entrance
Chapters from PPP2 explicitly links chapters 1, 11, 22, 23, 24, 25, 27 and Glossary, not authorization for the whole book
- Chapter 11 author's complete PDF
pp379—410, fully read and supplemented p382 original figure
Public full-book research text
Full-book public OCR, actually supplemented the remaining chapters and appendices; there are transcription and image gaps, not distributed on this site
The research copy is not linked from this site.
Programs help you clarify the problem, not just implement the answer
§0.2 Teaching and learning philosophy;Chapter6—7 Calculator;Chapter10 Input and Output Streams;§11.7—11.8;Chapter26 Design for testing
PPP puts input, errors, types, and debugging into the same set of gradually developing practical problems. The calculator does not have a complete architecture from the start, but gradually separates responsibilities as lexical analysis, syntax, variables, and recovery strategies appear; this is not encouraging lack of planning, but letting the implementation expose requirements that have not yet been thought through. Input processing is similar: successful field conversion, legal range, complete record, and valid output object are four different promises. This site uses limited string parsing to demonstrate establishing candidate values first then committing, avoiding erroneous records leaving a half new piece of data. The Graph_lib in the textbook is for teaching, the prediction of C++14 concepts was not an ISO-published feature at the time; modern reading needs to distinguish persistent engineering principles, the library environment of the time, and transcription defects.
Related fundamentals
Exception Safety: Guarantees, noexcept, and Commit PointsConstruction and destruction orderAlgorithms: sort, boundary search, and erase-remove