本丛书不仅涵盖了程序设计、数据结构、操作系统、计算机体系结构、数据库、编译原理、软件工程、图形学、通信与网络、离散数学等国内大学计算机专业普遍开设的核心课程,而且各具特色——有的出自语言设计者之手、有的历三十年而不衰、有的已被全世界的几百所高校采用。在这些圆熟通博的名师大作的指引之下,读者必将在计算机科学的宫殿中由登堂而入室。
Preface\r\n1:Introduction to Objects\r\n2:Making & Using Objects\r\n3:The C in C++\r\n4:Data Abstraction\r\n5:Hiding the Implementation\r\n6:Initialization & Cleanup\r\n7:Function Overloading & Default Arguments\r\n8:Constants\r\n9:Inline Functions\r\n10:Name Control\r\n11:References & the Copy-Constructor\r\n12:Operator Overloading\r\n13:Dynamic Object Creation\r\n14:Inheritance & Composition\r\n15:Polymorphism & Virtual Functions\r\n16:Introduction to Templates\r\nA:Coding Style\r\nB:Programming Guidelines\r\nC:Recommended Reading\r\nIndex
You can't just look at C++ as a collection of features; some of the features make no sense in isolation. You can only use the sum of the parts if you are thinking about design, not simply coding. And to understand C++ this way, you must understand the problems with C and with programming in general. This book discusses programming problems, why they are problems, and the approach C++ has taken to solve such problems. Thus, the set of features I explain in each chapter will be based on the way that I see a particular type of problem being solved with the language. In this way I hope to move you, a little at a time, from understanding C to the point where the C++ mindset becomes your native tongue.
Throughout, I'll be taking the attitude that you want to build a model in your head that allows you to understand the language all the way down to the bare metal; ifyou encounter a puzzle, you'll be able to feed it to your model and deduce the answer. I will try to convey to you the insights that have rearranged my brain to make me start "thinking in C++."
What's new in the second edition
This book is a thorough rewrite of the first edition to reflect all of the changes introduced in C++ by the finalization of the C++ Standard, and also to reflect what I've learned since writing the first edition. The entire text present in the first edition has been examined and rewritten, sometimes removing old examples, often changing existing examples and adding new ones, and adding many new exercises. Significant rearrangement and re-ordering of the material took place to reflect the availability of better tools and my improved understanding of how people learn C++. A new chapter was added which is a rapid introduction to the C concepts and basic C++ features for those who don't have the C background to tackle the rest of the book. The CD ROM bound into the back of the book contains a seminar that is an even gentler introduction to the C concepts necessary to understand C++ (or Java). It was created by Chuck Allison for my company (MindView, Inc.), and it's called "Thinking in C: Foundations for Java and C+ +." It introduces you to the aspects of C that are necessary for you to move on to C++ or Java, leaving out the nasty bits that C programmers must deal with on a day-tp-day basis but that the C++ and Java languages steer you away from (or even eliminate, in the case of Java).
So the short answer to the question "what's different in the 2nd edition?" is : what isn't brand new has been rewritten, sometimes to the point where you wouldn't recognize the original examples and material.