2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > c 语言程序设计英文版教程 《C++大学教程(第7版)英文原版》(C++ How to Progra

c 语言程序设计英文版教程 《C++大学教程(第7版)英文原版》(C++ How to Progra

时间:2023-05-09 13:37:32

相关推荐

c 语言程序设计英文版教程 《C++大学教程(第7版)英文原版》(C++ How to Progra

“Making a Difference” Exercise Sets. We encourage you to use computers and the Internet to research and solve problems that really matter. These new exercises are meant to increase awareness of important issues the world is facing. We hope you’ll approach them with your own values, politics and beliefs.

Prefer string Objects to C Strings. C++ offers two types of strings—string class objects (which we use starting in Chapter 3) and C-style, pointer-based strings. We continue to include some early discussions of C strings to give you practice with pointer manipulations, to illustrate dynamic memory allocation with new and delete and to prepare you for working with C strings in the “legacy code” that you’ll encounter in industry. In new development, you should favor string class objects. We’ve replaced most occurrences of C strings with instances of C++ class string to make programs more robust and eliminate many of the security problems that can be caused by manipulating C strings.

Prefer vectors to C Arrays. Similarly, C++ offers two types of arrays—vector class objects (which we use starting in Chapter 7) and C-style, pointer-based arrays. As appropriate, we use class template vector instead of C arrays throughout the book. However, we begin by discussing C arrays in Chapter 7 to prepare you for working with legacy code and to use as a basis for building your own customized Array class in Chapter 11, Operator Overloading.

New Companion Website (/deitel/). This edition’s Companion Website includes a wealth of material to help you with your study of C++ programming. We provide an extensive number of VideoNotes that walk you through the code examples in 14 of the key chapters, solutions to many of the book’s exercises, bonus chapters, and more (see the Companion Website section later in this Preface).

Dynamic Memory Allocation. We moved dynamic memory allocation later in the book to Chapter 11, where it’s first needed. The “proxy class” discussion (which uses dynamic memory) has also been moved to Chapter 11.

Titled Programming Exercises. We’ve titled all the programming exercises. This and the previous two features help instructors tune assignments for their classes.

Eliminated “Magic” Numbers. We eliminated all uses of truly “magic” numbers and replaced them with named constants or enums as appropriate. In a few cases in which the context is absolutely clear, we don’t consider numbers to be “magic.”

Enhanced Use of const. We increased our use of const bookwide to encourage better software engineering.

Eliminated “return 0;”. According to the C++ standard, any main function that does not contain “return 0;” as its last statement is assumed to return 0. For this reason, we’ve eliminated “return 0;” from all but the first program in the book.

Use “using namespace std;”. Previously, we specified a using declaration for every individual item that we referenced from a C++ Standard Library header file. Since these items are well known and unlikely to have name collisions with other C++ libraries, we now use “using namespace std;” for all C++ Standard Library components from Chapter 3 forward. This simplifies the programs and saves many lines of code.

New Design. The book has a new interior design that graphically serves to organize, clarify and highlight the information, and enhances the book’s pedagogy.

Reorganized Optional OOD Case Study. We tuned the Object-Oriented Design/UML automated teller machine (ATM) case study and reorganized it into two optional chapters (25 and 26) that present the ATM’s design and complete code implementation. This is a nice business example that most students can relate to. Working through these two chapters as a unit will help you tie together many of the object-oriented programming (OOP) concepts you learn in Chapters 1–13. A key concept in OOP is the interactions among objects. In most textbooks, the code examples create and use only one or two objects. The ATM case study gives you the opportunity to examine the interactions among many objects that provide the functionality of a substantial system. For instructors who wish to cover the case study in a distributed manner, we’ve indicated where each section in Chapters 25 and 26 can be covered inline with earlier chapters in the book.

Function Pointer Exercises. We added several real-world function-pointers exercises. These are available at the Companion Website and at /books/cpphtp7/.

Improved Terminology Sections. We’ve added page numbers for the defining occurrences of all terms in the terminology lists for easy reference.

c 语言程序设计英文版教程 《C++大学教程(第7版)英文原版》(C++ How to Program 7th Edition)[PDF]...

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。