{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
送料無料

配送エリアを切り替えます

在庫情報と配送スピードは地域によって異なる場合があります。

郵便番号の履歴

{{email ? __('Got it!') : __('Restock Alert')}}

商品が再入荷され次第、すぐにメールでお知らせします。

Yami

Jingdong book

C++程序设计(第8版 影印版)

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

C++程序设计(第8版 影印版)

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
終了まで
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
セール終了まで
タイムセール開始まであと タイムセール終了まであと
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) 詳細
消費期限

現在は販売していません

この商品がいつ再入荷するか、分かりません。

当該地域へ配送できません
売り切れ

製品説明

商品の詳細を全て表示
Content Description

《C++程序设计(第8版 影印版)》是最优秀的C++入门教材,深受师生欢迎。作者结合自己多年的教学经验,根据教学大纲精心设计并编写了书中内容。与此同时,本书还采用了很多便于读者巩固所学知识的教学特征,比如各章开始处的小节总览,书中随处可见的总结框、编程提示和编程陷阱,各章结尾处的小结、习题和编程项目等。这些非常适合初学者掌握重要的编程概念。
《C++程序设计(第8版 影印版)》共18章,8个附录。在讲解C++基础知识之后,直接引导学生深入函数、I/O流、类、控制流程、命名空间、数组、字符串、指针和动态数组、递归、模板、指针和链表、派生类、异常以及标准模板库。
Original edition, entitled PROBLEM SOLVING WITH C++, 8E, 9780132162739 by SAVITCH,
WALTER, published by Pearson Education, Inc, publishing as Addison-Wesley, Copyright ? 2012 Pearson Education, Inc..
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage retrieval system, without permission from Pearson Education, Inc.
China edition published by PEARSON EDUCATION ASIA LTD., and TSINGHUA UNIVERSITY PRESS LIMITED Copyright ? 2014.
This edition is manufactured in the People’s Republic of China, and is authorized for sale and distribution in the People’s Republic of China exclusively (except Taiwan, Hong Kong SAR and Macau SAR).
《C++程序设计(第8版 影印版)》影印版由Pearson Education授权给清华大学出版社在中国境内(不包括中国台湾、香港特别行政区和澳门特别行政区)出版发行。
Author Description

Walter Savitch,美国加州大学圣地亚哥分校荣誉退休教授,拥有加州大学伯克利分校博士学位,曾担任加州大学圣地亚哥分校计算机科学系教授和认知科学跨学科博士项目主任。他在复杂性理论和并行计算模型方面具有卓越的贡献,其研究领域包括形式语言理论计算语言学等。Savitch教授还是C++和Java经典教材的缔造者,他的作品通俗易懂,生动有趣,贴近生活,应用性和实用性很强,深受全球数十万读者(包括教师和学生)的欢迎。
Comments

★“我的学生和我非常喜欢这本教材,Savitch教授功力深厚,关于将这些枯燥的知识变得浅显易懂,而且他的行文诙谐有趣,我们师生都喜欢这样的方式,学生们告诉我,他们终于买到了一个真正的有所值的大学教材。”
——Jennifer Perkins, 阿肯色州立大学小石城分校

★“Savitch的这本我校已经使用多年,它赢得了我们师生的一致认同。Walter Savich用清晰、简练的风格解释了难懂的编程概念,讨论了C++语言的所有重要特色。”
——Carol Roberts, 缅因州立大学
Catalogue

Brief Contents
Table of Location of VideoNotes
Inside front cover and inside back cover
Chapter 1 1Introduction to Computers and C++ Programming 1
Chapter 2 2C++ Basics 39
Chapter 3 3More Flow of Control 109
Chapter 4 4Procedural Abstraction and Functions That Return a Value 177
Chapter 5 5Functions for All Subtasks 247
Chapter 6 6I/O Streams as an Introduction to Objects and Classes 301
Chapter 7 7Arrays 373
Chapter 8 8Strings and Vectors 441
Chapter 9 9Pointers and Dynamic Arrays 493
Chapter 10 0Defining Classes 525
Chapter 11 Friends, Overloaded Operators, and Arrays in Classes 601
Chapter 12 Separate Compilation and Namespaces 685
Chapter 13 Pointers and Linked Lists 721
Chapter 14 Recursion 769
Chapter 15 Inheritance 811
Chapter 16 Exception Handling 867
Chapter 17 Templates 899
Chapter 18 Standard Template Library 931
Appendices
1 C++ Keywords 987
2 Precedence of Operators 988
3 The ASCII Character Set 990
4 Some Library Functions 991
5 Inline Functions 998
6 Overloading the Array Index Square Brackets 999
7 The this Pointer 1001
8 Overloading Operators as Member Operators 1004
Table of Location of VideoNotes
Inside front cover and inside back cover
Chapter 1 1Introduction to Computers and C++ Programming 1
1.1 COMPuTER SYSTEMS 2
Hardware 2
Software 7
High-Level Languages 8
Compilers 9
History Note 12
1.2 PROgRAMMINg AND PROBLEM-SOLVINg 12
Algorithms 12
Program Design 15
Object-Oriented Programming 16
The Software Life Cycle 17
1.3 INTRODuCTION TO C++ 18
Origins of the C++ Language 18
A Sample C++ Program 19
Pitfall: Using the Wrong Slash in \n 23
Programming Tip: Input and Output Syntax 23
Layout of a Simple C++ Program 24
Pitfall: Putting a Space Before the include File Name 26
Compiling and Running a C++ Program 26
Programming Tip: Getting Your Program to Run 27
1.4 TESTINg AND DEBuggINg 29
Kinds of Program Errors 30
Pitfall: Assuming Your Program Is Correct 31
Chapter Summary 31
1Answers to Self-Test Exercises 32
2Programming Projects 35
Chapter 2 C++ Basics 39
2.1 VARIABLES AND ASSIgNMENTS 40
Variables 40
0Names: Identifiers 42
2Variable Declarations 44
4Assignment Statements 45
5Pitfall: Uninitialized Variables 47
7Programming Tip: Use Meaningful Names 49
2.2 INPuT AND OuTPuT 50
Output Using cout 50
Include Directives and Namespaces 52
Escape Sequences 53
Programming Tip: End Each Program with a \n or endl 54
Formatting for Numbers with a Decimal Point 55 Input Using cin 56
Designing Input and Output 58
Programming Tip: Line Breaks in I/O 58
2.3 DATA TYPES AND ExPRESSIONS 60
The Types int and double 60
0Other Number Types 62
2The Type char 63
3The Type bool 64
4Introduction to the Class string 65
5Type Compatibilities 66
6Arithmetic Operators and Expressions 68
8Pitfall: Whole Numbers in Division 71
1More Assignment Statements 73
2.4 SIMPLE FLOw OF CONTROL 73
A Simple Branching Mechanism 74
4Pitfall: Strings of Inequalities 79
9Pitfall: Using = in place of == 80
0Compound Statements 81
1Simple Loop Mechanisms 83
Increment and Decrement Operators 86
Programming Example: Charge Card Balance 88
Pitfall: Infinite Loops 89
2.5 PROgRAM STYLE 92
Indenting 92 Comments 92 Naming Constants 94
Chapter Summary 97 Answers to Self-Test Exercises 97
Programming Projects 102
Chapter 3 More Flow of Control 109
3.1 uSINg BOOLEAN ExPRESSIONS 110
Evaluating Boolean Expressions 110
Pitfall: Boolean Expressions Convert to int Values 114
Enumeration Types (Optional) 117
3.2 MuLTIwAY BRANCHES 118
Nested Statements 118
Programming Tip: Use Braces in Nested Statements 119
Multiway if-else Statements 121
Programming Example: State Income Tax 123
The switch Statement 126
Pitfall: Forgetting a break in a switch Statement 130
Using switch Statements for Menus 131
Blocks 133
Pitfall: Inadvertent Local Variables 136
3.3 MORE ABOuT C++ LOOP STATEMENTS 137
The while Statements Reviewed 137
Increment and Decrement Operators Revisited 139
The for Statement 142
Pitfall: Extra Semicolon in a for Statement 147
What Kind of Loop to Use 148
Pitfall: Uninitialized Variables and Infinite Loops 150
The break Statement 151 Pitfall: The break Statement in Nested Loops 152
7387_Savitch_FM_ppi-xxx.indd 18 2/2/11 5:45 PM
contents xix
3.4 DESIgNINg LOOPS 153
Loops for Sums and Products 153 Ending a Loop 155 Nested Loops 158 Debugging Loops 160
Chapter Summary 163 Answers to Self-Test Exercises 164 Programming Projects 170
Chapter 4 4Procedural Abstraction and Functions That Return a Value 177
4.1 TOP-DOwN DESIgN 178
4.2 PREDEFINED FuNCTIONS 179
Using Predefined Functions 179 Random Number Generation 184 Type Casting 186 Older Form of Type Casting 188 Pitfall: Integer Division Drops the Fractional Part 188
4.3 PROgRAMMER-DEFINED FuNCTIONS 189
Function Definitions 189 Functions That Return a Boolean Value 195 Alternate Form for Function Declarations 195 Pitfall: Arguments in the Wrong Order 196 Function Definition–Syntax Summary 197 More About Placement of Function Definitions 198 Programming Tip: Use Function Calls in Branching Statements 199
4.4 PROCEDuRAL ABSTRACTION 200
The Black-Box Analogy 200 Programming Tip: Choosing Formal Parameter Names 203 Programming Tip: Nested Loops 204 Case Study: Buying Pizza 207 Programming Tip: Use Pseudocode 213
4.5 SCOPE AND LOCAL VARIABLES 214
The Small Program Analogy 214 Programming Example: Experimental Pea Patch 217
Global Constants and Global Variables 217 Call-by-Value Formal Parameters Are Local Variables 220 Block Scope 222 Namespaces Revisited 223 Programming Example: The Factorial Function 226
4.6 OVERLOADINg FuNCTION NAMES 228
Introduction to Overloading 228 Programming Example: Revised Pizza-Buying Program 231 Automatic Type Conversion 234 Chapter Summary 236 Answers to Self-Test Exercises 236 Programming Projects 241
Chapter 5 Functions for All Subtasks 247
5.1 void FuNCTIONS 248
Definitions of void Functions 248 Programming Example: Converting Temperatures 251 return Statements in void Functions 251
5.2 CALL-BY-REFERENCE PARAMETERS 255
A First View of Call-by-Reference 255 Call-by-Reference in Detail 258 Programming Example: The swap_values Function 263 Mixed Parameter Lists 264 Programming Tip: What Kind of Parameter to Use 265 Pitfall: Inadvertent Local Variables 266
5.3 uSINg PROCEDuRAL ABSTRACTION 269
Functions Calling Functions 269 Preconditions and Postconditions 271 Case Study: Supermarket Pricing 272
5.4 TESTINg AND DEBuggINg FuNCTIONS 277
Stubs and Drivers 278
5.5 gENERAL DEBuggINg TECHNIquES 283
Keep an Open Mind 283 Check Common Errors 283 Localize the Error 284 The assert Macro 286 2/2/11 5:45 PM
Chapter Summary 288
8Answers to Self-Test Exercises 289
9Programming Projects 292
Chapter 6 6I/O Streams as an Introduction to Objects and Classes 301
6.1 STREAMS AND BASIC FILE I/O 302
Why Use Files for I/O? 303
3File I/O 304
4Introduction to Classes and Objects 308
8Programming Tip: Check Whether a File Was Opened
d Successfully 310
0Techniques for File I/O 312
2Appending to a File (Optional) 316
6File Names as Input (Optional) 317
6.2 TOOLS FOR STREAM I/O 319
Formatting Output with Stream Functions 319
9Manipulators 325
5Streams as Arguments to Functions 328
8Programming Tip: Checking for the End of a File 328
8A Note on Namespaces 331
1Programming Example: Cleaning Up a File Format 332
6.3 CHARACTER I/O 334
The Member Functions get and put 334
4The putback Member Function (Optional) 338
8Programming Example: Checking Input 339
9Pitfall: Unexpected '\n' in Input 341
1Programming Example: Another new_line Function 343
3Default Arguments for Functions (Optional) 344
4The eof Member Function 349
9Programming Example: Editing a Text File 351
1Predefined Character Functions 352
2Pitfall: toupper and tolower Return Values 354
Chapter Summary 356
6Answers to Self-Test Exercises 357
7Programming Projects 364
Chapter 7 Arrays 373
7.1 INTRODuCTION TO ARRAYS 374
Declaring and Referencing Arrays 374 Programming Tip: Use for Loops with Arrays 376 Pitfall: Array Indexes Always Start with Zero 376 Programming Tip: Use a Defined Constant for the Size of an Array 376 Arrays in Memory 378 Pitfall: Array Index Out of Range 379 Initializing Arrays 381
7.2 ARRAYS IN FuNCTIONS 383
Indexed Variables as Function Arguments 383 Entire Arrays as Function Arguments 385 The const Parameter Modifier 388 Pitfall: Inconsistent Use of const Parameters 391 Functions That Return an Array 391 Case Study: Production Graph 392
7.3 PROgRAMMINg wITH ARRAYS 405
Partially Filled Arrays 405 Programming Tip: Do Not Skimp on Formal Parameters 408 Programming Example: Searching an Array 408 Programming Example: Sorting an Array 411
7.4 MuLTIDIMENSIONAL ARRAYS 415
Multidimensional Array Basics 416 Multidimensional Array Parameters 416 Programming Example: Two-Dimensional Grading Program 418 Pitfall: Using Commas Between Array Indexes 422
Chapter Summary 423 Answers to Self-Test Exercises 424 Programming Projects 428
Chapter 8 Strings and Vectors 441
8.1 AN ARRAY TYPE FOR STRINgS 443
C-String Values and C-String Variables 443 Pitfall: Using = and == with C Strings 446 2/2/11 5:45 PM
contents xxiii
Other Functions in 448
8C-String Input and Output 453
3C-String-to-Number Conversions and Robust Input 455
8.2 THE STANDARD string CLASS 461
Introduction to the Standard Class string 461
1I/O with the Class string 464
4Programming Tip: More Versions of getline 467
7Pitfall: Mixing cin >> variable; and getline 468
8String Processing with the Class string 469
9Programming Example: Palindrome Testing 473
3Converting Between string Objects and C Strings 476
8.3 VECTORS 477
Vector Basics 477 Pitfall: Using Square Brackets Beyond the Vector Size 480 Programming Tip: Vector Assignment Is Well Behaved 481 Efficiency Issues 481
Chapter Summary 483
3Answers to Self-Test Exercises 484
4Programming Projects 486
Chapter 9 Pointers and Dynamic Arrays 493
9.1 POINTERS 494
Pointer Variables 495
5Basic Memory Management 502
2Pitfall: Dangling Pointers 503
3Static Variables and Automatic Variables 504
4Programming Tip: Define Pointer Types 504
9.2 DYNAMIC ARRAYS 507
Array Variables and Pointer Variables 507
7Creating and Using Dynamic Arrays 508
8Pointer Arithmetic (Optional) 514
4Multidimensional Dynamic Arrays (Optional) 516
Chapter Summary 518
8Answers to Self-Test Exercises 518
8Programming Projects 519
Chapter 10 0Defining Classes 525
10.1 STRuCTuRES 526
Structures for Diverse Data 526
Pitfall: Forgetting a Semicolon in a Structure Definition 531
Structures as Function Arguments 532
Programming Tip: Use Hierarchical Structures 533
Initializing Structures 535
10.2 CLASSES 538
Defining Classes and Member Functions 538 Public and Private Members 543 Programming Tip: Make All Member Variables Private 551 Programming Tip: Define Accessor and Mutator Functions 551 Programming Tip: Use the Assignment Operator with Objects 553 Programming Example: BankAccount Class—Version 1 554 Summary of Some Properties of Classes 558 Constructors for Initialization 560 Programming Tip: Always Include a Default Constructor 568 Pitfall: Constructors with No Arguments 569
10.3 ABSTRACT DATA TYPES 571
Classes to Produce Abstract Data Types 572 Programming Example: Alternative Implementation of a Class 576
10.4 INTRODuCTION TO INHERITANCE 581
Derived Classes 582 Defining Derived Classes 583
Chapter Summary 587 Answers to Self-Test Exercises 588 Programming Projects 594
Chapter 11 1Friends, Overloaded Operators, and Arrays in Classes 601
11.1 FRIEND FuNCTIONS 602
Programming Example: An Equality Function 602 Friend Functions 606 Programming Tip: Define Both Accessor Functions and Friend Functions 608 2/2/11 5:45 PM
contents xxv
Programming Tip: Use Both Member and Nonmember Functions 610 Programming Example: Money Class (Version 1) 610 Implementation of digit_to_int (Optional) 617 Pitfall: Leading Zeros in Number Constants 618 The const Parameter Modifier 620 Pitfall: Inconsistent Use of const 621
11.2 OVERLOADINg OPERATORS 625
Overloading Operators 626
6Constructors for Automatic Type Conversion 629
9Overloading Unary Operators 631
1Overloading >> and << 632
11.3 ARRAYS AND CLASSES 642
Arrays of Classes 642 Arrays as Class Members 646 Programming Example: A Class for a Partially Filled Array 647
11.4 CLASSES AND DYNAMIC ARRAYS 649
Programming Example: A String Variable Class 650
0Destructors 653
3Pitfall: Pointers as Call-by-Value Parameters 656
6Copy Constructors 657
7Overloading the Assignment Operator 662
Chapter Summary 665
5Answers to Self-Test Exercises 665
5Programming Projects 675
Chapter 12 Separate Compilation and Namespaces 685
12.1 SEPARATE COMPILATION 686
ADTs Reviewed 687 Case Study: DigitalTime —A Class Compiled Separately 688 Using #ifndef 697 Programming Tip: Defining Other Libraries 700
12.2 NAMESPACES 701
Namespaces and using Directives 701
1Creating a Namespace 703
3Qualifying Names 706
6A Subtle Point About Namespaces (Optional) 707
Unnamed Namespaces 708 Programming Tip: Choosing a Name for a Namespace 713 Pitfall: Confusing the Global Namespace and the Unnamed Namespace 714
Chapter Summary 715 Answers to Self-Test Exercises 716 Programming Projects 718
Chapter 13 Pointers and Linked Lists 721
13.1 NODES AND LINKED LISTS 722
Nodes 722 Linked Lists 728 Inserting a Node at the Head of a List 729 Pitfall: Losing Nodes 732 Searching a Linked List 733 Pointers as Iterators 735 Inserting and Removing Nodes Inside a List 737 Pitfall: Using the Assignment Operator with Dynamic Data Structures 740 Variations on Linked Lists 741 Linked Lists of Classes 744
13.2 STACKS AND quEuES 747
Stacks 747 Programming Example: A Stack Class 748 Queues 753 Programming Example: A Queue Class 754
Chapter Summary 758 Answers to Self-Test Exercises 758 Programming Projects 761
Chapter 14 Recursion 769
14.1 RECuRSIVE FuNCTIONS FOR TASKS 771
Case Study: Vertical Numbers 771 A Closer Look at Recursion 777 Pitfall: Infinite Recursion 779 2/2/11 5:45 PM
contents xxvii
Stacks for Recursion 780
0Pitfall: Stack Overflow 782
2Recursion Versus Iteration 782
14.2 RECuRSIVE FuNCTIONS FOR VALuES 784
General Form for a Recursive Function That Returns a Value 784 Programming Example: Another Powers Function 784
14.3 THINKINg RECuRSIVELY 789
Recursive Design Techniques 789 Case Study: Binary Search—An Example of Recursive Thinking 790 Programming Example: A Recursive Member Function 798
Chapter Summary 802
2Answers to Self-Test Exercises 802
2Programming Projects 807
Chapter 15 Inheritance 811
15.1 INHERITANCE BASICS 812
Derived Classes 813 Constructors in Derived Classes 821 Pitfall: Use of Private Member Variables from the Base Class 824 Pitfall: Private Member Functions Are Effectively Not Inherited 826 The protected Qualifier 826 Redefinition of Member Functions 829 Redefining Versus Overloading 832 Access to a Redefined Base Function 834
15.2 INHERITANCE DETAILS 835
Functions That Are Not Inherited 835
5Assignment Operators and Copy Constructors in Derived
d Classes 836
6Destructors in Derived Classes 837
15.3 POLYMORPHISM 838
Late Binding 839
9Virtual Functions in C++ 840
0Virtual Functions and Extended Type Compatibility 845
5Pitfall: The Slicing Problem 849
9Pitfall: Not Using Virtual Member Functions 850
Pitfall: Attempting to Compile Class Definitions Without Definitions for Every Virtual Member Function 851 Programming Tip: Make Destructors Virtual 851
Chapter Summary 853 Answers to Self-Test Exercises 853 Programming Projects 857
Chapter 16 Exception Handling 867
16.1 1ExCEPTION-HANDLINg BASICS 869
A Toy Example of Exception Handling 869 Defining Your Own Exception Classes 878 Multiple Throws and Catches 878 Pitfall: Catch the More Specific Exception First 882 Programming Tip: Exception Classes Can Be Trivial 883 Throwing an Exception in a Function 883 Exception Specification 885 Pitfall: Exception Specification in Derived Classes 887
16.2 2PROgRAMMINg TECHNIquES FOR ExCEPTION HANDLINg 888
When to Throw an Exception 888 Pitfall: Uncaught Exceptions 890 Pitfall: Nested try-catch Blocks 890 Pitfall: Overuse of Exceptions 890 Exception Class Hierarchies 891 Testing for Available Memory 891 Rethrowing an Exception 892
Chapter Summary 892 Answers to Self-Test Exercises 892 Programming Projects 894
Chapter 17 Templates 899
17.1 1TEMPLATES FOR ALgORITHM ABSTRACTION 900
Templates for Functions 901 Pitfall: Compiler Complications 905 Programming Example: A Generic Sorting Function 907
Programming Tip: How to Define Templates 911
1Pitfall: Using a Template with an Inappropriate Type 912
17.2 TEMPLATES FOR DATA ABSTRACTION 913
Syntax for Class Templates 913
3Programming Example: An Array Class 916
Chapter Summary 922
2Answers to Self-Test Exercises 922
2Programming Projects 925
Chapter 18 Standard Template Library 931
18.1 ITERATORS 933
using Declarations 933
3Iterator Basics 934
4Pitfall: Compiler Problems 938
8Kinds of Iterators 940
0Constant and Mutable Iterators 944
4Reverse Iterators 945
5Other Kinds of Iterators 946
18.2 CONTAINERS 947
Sequential Containers 948
8Pitfall: Iterators and Removing Elements 952
2Programming Tip: Type Definitions in Containers 953
3Container Adapters stack and queue 953
3Associative Containers set and map 957
7Efficiency 964
18.3 gENERIC ALgORITHMS 965
Running Times and Big-O Notation 965
5Container Access Running Times 970
0Nonmodifying Sequence Algorithms 971
1Container Modifying Algorithms 975
5Set Algorithms 977
7Sorting Algorithms 978
Chapter Summary 979
9Answers to Self-Test Exercises 979
9Programming Projects 981
1 C++ Keywords 987
2 Precedence of Operators 988
3 The ASCII Character Set 990
4 Some Library Functions 991
5 Inline Functions 998
6 Overloading the Array Index Square Brackets 999
7 The this Pointer 1001
8 Overloading Operators as Member Operators 1004
INDEx 1006
Introduction

本书适合C++程序设计和计算机科学入门课程使用。阅读本书不要求读者有任何编程经验,也不要求掌握除了中学代数之外的其他任何数学知识。
本书前几版的读者请阅读关于第8版修订内容的小节,的其余内容可略过。新读者请阅读的全部内容以把握本书脉络。
第8版修订内容
第8版采用和第7版相同的编程体例。第7版全部内容予以保留,但进行了以下改进。
第10章不再使用流类(比如ifstream和ofstream)介绍继承概念,而是,使用那一章更简单的银行账户例子来介绍。
额外添加了有关作用域、参数传递、随机数生成、动态数组的内容,有几章的幻灯片进行了重新制作。
新增25个编程项目,合并到每章末尾现有的项目中。
本书配套网站添加了15个新的视频讲解,总数达54个。这些视频讲解辅导学生解题和写程序,有助于巩固对关键编程概念的掌握。如果书中某个主题有对应的视频讲解,就会出现一行特殊的注释(视频讲解……)。
用过第7版的教师可以沿用以前的教案,几乎不需要进行任何改动。
主题可以灵活排序
本书允许教师自由地重新安排教学顺序。为了演示这一灵活性,下面推荐了两种方式来排列主题顺序。采用任何一种方式阅读本书,都不会影响学习的连贯性。为了在重新排序时确保这种连贯性,可能需要移动个别小节而不是全章。但是,只有较大的、位置便利的小节才需要移动。为了帮助您根据需要自定义一个教学/阅读顺序,图P.1展示了一幅依赖图。另外,每章都有“预备知识”小节,解释了学习那一章的每一节之前需要掌握哪些内容。
重新排序1:提前学习类
为了有效地设计类,学生需要掌握一些基本的工具,比如控制结构和函数定义。这些基础知识在第1章~第6章介绍。完成第6章的学习后,学生就可以开始编写自己的类了。为了提前学习类的知识,可以像下面这样重新安排各章的顺序。
基础知识 第1章、第2章、第3章、第4章、第5章和第6章。这6章全面介绍控制结构、函数定义和基本文件I/O。第3章介绍几种额外的控制结构,如果希望尽早学习类,可以考虑推迟这一章的学习。
类和命名空间 第10章、第11章的11.1节和11.2节、第12章。这些章节全面介绍了如何定义类、友元、重载操作符和命名空间。
数组、字符串和向量 第7章和第8章。
指针和动态数组 第9章。
类中的数组 第11章的11.3节和11.4节。
继承 第15章。
递归 第14章(也可以推迟到稍晚的时候学习)。
指针和链表 第13章。
可能还要用到以下各章的部分内容。
异常处理 第16章。
模板 第17章。
标准模板库 第18章。
重新排序2:略微延后类的学习
在“重新排序2”中,将先学完所有控制结构,再学习有关数组的基本知识,之后才开始学习类。虽然对类的接触要比“重新排序1”晚,但还是比本书的默认顺序略微提前一些。
基础知识 第1章、第2章、第3章、第4章、第5章和第6章。这6章全面介绍了控制结构、函数定义和基本文件I/O。
数组和字符串 第7章、第8章的8.1节和8.2节。
类和命名空间 第10章、第11章的11.1节、11.2节和第12章。这些章节全面介绍了如何定义类、友元、重载操作符和命名空间。
指针和动态数组 第9章。
类中的数组 第11章的11.3节和11.4节。
继承 第15章。
递归 第14章(也可以推迟到稍晚的时候学习)。
向量 8.3节。
指针和链表 第13章。
可能还要用到以下各章的部分内容。
异常处理 第16章。
模板 第17章。
标准模板库 第18章。
面向学生的易用性
一本书必须按恰当的顺序来讲解恰当的主题,这是最起码的要求。另外,在老师和其他有经验的程序员看来,书中的内容必须清晰而又正确,这是另一个最起码的要求。但是,是不是符合这两项要求的书都是好书呢?答案是否定的。书中的内容必须采取有利于初学者使用的方式来编排。在这本入门教科书中,我尽力让学生觉得清楚和友好。本书以前版本的大量学生反馈证明,这种写作风格确实使内容更清晰,能使学生充分享受到学习的乐趣。
ANSI/ISO C++标准
本书完全兼容于符合最新ANSI/ISO C++标准的编译器。
高级主题
许多“高级主题”都成为标准CS1课程的一部分。即使它们不是课程的一部分,也最好以补充材料的形式在书中提供。本书提供了大量高级主题,它们既可集成到一门课程中,也可作为自学主题。本书全面讲述了C++模板、继承(包括虚函数)、异常处理和STL(Standard Template Library,标准模板库)。虽然本书使用了库,而且教给学生库的重要性,但不要求任何非标准库。本书只使用所有C++实现都附带的库。
依赖图
依赖图展示了各个章节可能的排序方式。连接两个框的实线表明上部的框必须先于下部的框完成。只要符合这个条件,采用任何阅读顺序都无损连贯性。如果一个框中包含小节编号,表明该框只代表那些小节,不代表全章。
小结框
每个要点都用一个有底纹的方框来小结。这些“小结框”散布于每一章。
自测题
每章都在重要位置提供大量自测题。每章末尾都有所有自测题的完整答案。
视频讲解
视频讲解(Video Note)是Pearson新推出的可视工具,目的是向学生讲解关键的编程概念和技术。这些短视频演示了从设计到编码来解决问题的过程。视频讲解使学生能方便地自学自己感兴趣的主题,允许选择、播放、倒退、快进和暂停等。每当看到“ 视频讲解……”,都表明当前主题有一段对应的视频讲解。请自行上网观看视频,网址是http://media.pearsoncmg.com/aw/aw_savitch_cpp_8/videonotes/vn.html。注意,由于是英文视频,所以为了方便索引,书中保留了这些视频的英文名称。
支持材料
部分支持材料是本书所有读者都能使用的。另一部分仅供有资格的教师使用。
适于本书所有读者的支持材料
本书源代码
PowerPoint幻灯片
视频讲解
为了获取这些材料,请访问本书译者博客(transbot.blog.163.com)。
适于有资格的教师的资源
选用本书作为教材的教师,可致函编辑信箱wenkaiqi@gmail.com了解详情。
教师资源指南(Instructor’s Resource Guide):包括每一章的教学要点、课堂测验/答案和大量编程项目的答案。
Test Bank和Test Generator:用于生成试卷。
PowerPoint幻灯片:包括本书的程序和插图。
Lab Manual(实验手册)。
致谢
在准备本书素材期间,很多个人和团体提供了大量建议和帮助,并和我进行了广泛而深入的探讨。本书第1版大部分内容是我在科罗拉多大学(波德分校)计算机系担任客座教授时写就的。其余内容和后续版本则是在加州大学(圣地亚哥分校)计算机科学与工程系完成的。非常感谢这两所学校为本书写作和教学所提供的良好氛围。
特别感谢向这一版和之前各版提供意见或者编程项目的个人,以下人名按字母排序:Joseph Allen,Noah Aydin,Claire Bono,Richard Borie,Andrew Burt,Edward Carr,Karla Chaveau,Wei Lian Chen,Joel Cohen,Doug Cosman,Charles Dowling,Scot Drysdale,Joe Faletti,Alex Feldman,Sheila Foster,Paulo Franca,Len Garrett,Jerrold Grossman,Eitan M. Gurari,Andrew Haas,Dennis Heckman,Bob Holloway,Nisar Hundewale,Matt Johnson,Bruce Johnston,Larry Johnson,Thomas Judson,Huzefa Kagdi,Paul J. Kaiser,Michael Keenan,Brian R. King,Paul Kube,Gilliean Lee,Barney MacCabe,Steve Mahaney,Michael Main,Walter A. Manrique,Anne Marchant,John Marsaglia,Nat Martin,Cynthia Martincic,Bob Matthews,Jesse Morehouse,Ethan Munson,Donald Needham,Dung Nguyen,Joseph D. Oldham,Jennifer Perkins,Jeff Roach,Carol Roberts,Ken Rockwood,John Russo,Amber Settle,Naomi Shapiro,Susanne Sherba,Michal Sramka,James Stepleton,Scott Strong,David Teague,Jeffrey Watson,Jerry Weltman,John J. Westman和Linda F. Wilson。
还要感谢用过本书前几版的许多老师,他们的建议相当有价值。最后感谢Kenrick Mock帮我实现了这一版的全部修订。他的工作令我和编辑激赏!

仕様

ブランド Jingdong book
ブランドテリトリー China

免責声明

商品の価格、パッケージ、仕様などの情報は、事前に通知することなく変更される場合があります。私たちは商品情報を迅速に更新するよう努力していますが、実際に受け取った商品を基準にしてください。商品を利用する前に、常に商品に付属するラベル、警告、および説明を読んでください。

利用規約の全文を見ます
お気に入りに追加
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
数量
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
JD@CHINAによって販売します
配送先
{{ __("Ship to United States only") }}
69以上のご注文は送料無料
正規保証

カートに入れました

ショッピングを続ける

おすすめアイテム

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

クーポン

{{ coupon.coupon_name_new | formatCurrency }}
受け取る 受取済み 受け取る終わりました
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
間もなく期限切れ: {{ formatTime(coupon.use_end_time) }}

このアイテムを友達と共有します

Yamiギフトカード特別価格

ギフトカードで支払えば、ギフトカード特別価格が得られます

規則説明

ギフトカード特別価格は、一部商品の特別割引オファーです;

ギフトカード特別価格の商品を購入する場合、決済時に電子ギフトカードで相殺し、ギフトカードの残高が註文したギフトカード特別価格商品の合計価格を支払うのに十分であれば、ギフトカード特別価格を適用することができます;

ギフトカードを利用しない場合、あるいはギフトカードの残高が前項に述べた要件を満たさない場合、ギフトカード特別価格を適用することができません。通常の販売価格で計算されることになり、これらの商品を購入することができます。

ギフトカード特別価格の商品を購入した場合、残高が足りない場合は、カートページまたは決済ページの「チャージ」ボタンをクリックしてギフトカードへの購入とチャージを行うことができます。

もし商品はギフトカード特別価格を持つならば、「特別」の特殊価格表記を表示します;

その他の質問や懸念がある場合は、いつでもカスタマーサービスにお問い合わせください;

Yamibuyは最終解釈権を有します。

Yamiによって販売します

サービス保証

Yami $49以上で送料無料
Yami 返品・交換保証
Yami アメリカから発送

配送情報

  • アメリカ

    スタンダード配送料 $5.99 (アラスカ、ハワイを除く)、最終価格が $49 以上で送料無料

    地方発送 $5.99 (カリフォルニア、ニューヨーク、ニュージャージー、マサチューセッツ、ペンシルベニア、上記州の一部地域); 最終価格が $49 以上で送料無料

    2 日以内の配送 (アラスカとハワイを含む) は送料 $19.99 からです

返品・交換ポリシー

Yamiはお客様が安心して購入できるように努めています。Yamibuy.comから出荷されたほとんどの商品は、受領後30日以内に返品可能です(食品、ドリンク、スナック、乾物、健康補助食品、新鮮な食料品および生鮮食品は、損傷または品質の問題がある場合、受領後7日以内に返品可能です。すべてのお客様に安全で高品質の商品を提供するために、美容製品については、品質の問題ではない限り、開封または利用後の返金や返品は対応できません。一部の商品には異なるポリシーまたは要件がありますので、特別な商品については以下をご覧いただくか、Yamiカスタマーサービスにお問い合わせください)。
ご理解とご支持に感謝します。

利用規約の全文を見ます

Yamiによって販売します

Yamibuy 電子ギフトカードの利用規約

購入時に自動チャージを選択した場合、注文完了後にギフトカードが自動的にアカウントにチャージされます;

購入時にメール送信を選択した場合、注文完了後にシステムが自動的にカード番号とパスワードを入力したメールアドレスに送信します;

メールを送信する際、どのユーザーもメールに送られてきたカード番号とパスワードを使用してギフトカードをチャージできますので、メール情報をしっかり保管してください。

メール受信に問題がある場合は、カスタマーサービスに連絡して処理してもらってください;

メールを送信する際、ギフトカードが交換されていない場合は、メールを再発行することができます。他のユーザーにすでに交換されている場合は、補償することはできません;

Yamibuyの電子ギフトカードは、自営または第三者商品の購入に使用できます;

Yamibuyの電子ギフトカードには有効期限がなく、長期にわたって有効です;

Yamiの電子ギフトカードの金額は、複数回に分けて使用することができます;

Yamiの電子ギフトカードの業務規則の最終的な解釈権は、Yamiウェブサイトに帰属します。

返品・交換ポリシー

既に利用された電子ギフトカードは返金不可です。

販売元: JD@CHINA

サービス保証

Yami $49以上で送料無料
Yami 最高のアフターサービス
Yami 米国本土から発送

配送情報

  • アメリカ

    スタンダード配送料 $5.99 (アラスカ、ハワイを除く)、最終価格が $49 以上で送料無料

    地方発送 $5.99 (カリフォルニア、ニューヨーク、ニュージャージー、マサチューセッツ、ペンシルベニア、上記州の一部地域); 最終価格が $49 以上で送料無料

    2 日以内の配送 (アラスカとハワイを含む) は送料 $19.99 からです

返品・交換ポリシー

商品到着後30日以内であれば返品が可能です。返品される商品は、購入時の請求書の原本を含む、元の梱包のまま新品である必要があります。お客様の費用負担で製品を返品してください。

JD@CHINAによって販売します

サービス保証

Yami $以上の店舗間注文: 送料無料
Yami 30日間返品・交換保証

Yami-中国集荷倉庫

Yamiが中国から厳選し、各優秀店舗の商品をYami中国統合センターに集めて、パッケージをまとめて一度に国際郵送でお客様の住所までお届けします。店舗間で$69以上になれば、送料無料になります。複数の販売者が提供する幅広い商品から選び、店舗間送料無料か低い送料を手軽に楽しめます。

返品・交換ポリシー

30日以内の返品・交換保証を提供します。商品は未使用の元のパッケージに入れられ、購入証明書が添付される必要があります。商品の品質上の問題、間違った配送、または配送漏れなど、販売者によって引き起こされたミスについては、返金処理されます。その他の理由による返品・交換の送料はお客様ご負担となります。すべての商品は長距離を輸送するため、内部品質に影響しない簡易包装のプレスや摩耗等が発生する場合、返品・交換は致しかねます。

配送情報

Yami 中国集荷 Consolidated Shippingの送料は$ 9.99 ($69以上のご注文は送料無料)

中国の販売業者は、ご注文後 2 営業日以内に商品を配達します、すべての荷物は Yami 中国集荷センターに到着し (特別な状況および中国の特定法定休日を除く)、そこで荷物は混載され、 UPSで米国に配送されます。中国から米国への UPS の平均配達時間は約 10 営業日で、直送の追跡番号に基づいていつでも追跡できます。感染拡大の影響で、現在の物流は約5日遅れる可能性があります。パッケージには顧客の署名が必要です。署名されない場合、パッケージが紛失するリスクはお客様が負うことになります。

JD@CHINAによって販売します

サービス保証

69以上のご注文は送料無料
正規保証

配送情報

Yami Consolidated Shipping送料$9.99($69以上のご注文は送料無料になる)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yamiポイント情報

すべての商品は、 Yamibuy.com のプロモーションまたはポイント イベントの対象外となります。

返品・交換ポリシー

商品到着後30日以内であれば返品が可能です。返品される商品は、購入時の請求書の原本を含む、元の梱包のまま新品である必要があります。お客様の費用負担で製品を返品してください。

Yami

Yamiアプリをダウンロードします

トップに戻ります

おすすめアイテム

ブランドについて

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

レビュー{{'('+ commentList.posts_count + ')'}}

商品レビューを書いて、他のユーザーを助ける最初の人になりましょう。

レビューを書く
{{ totalRating }} レビューを書く
  • {{i}}星

    {{i}} 星

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}非表示にします

{{ strLimit(comment,800) }}すべて見る

Show Original

{{ comment.content }}

Yami
すべてを表示します

{{ formatTime(comment.in_dtm) }} 購入済み {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}非表示にします

{{ strLimit(comment,800) }}すべて見る

Show Original

{{ comment.content }}

Yami
すべてを表示します

{{ formatTime(comment.in_dtm) }} 購入済み {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

関連するコメントはありません~

レビュー詳細

Yami Yami

{{ showTranslate(commentDetails) }}非表示にします

{{ strLimit(commentDetails,800) }}すべて見る

Show Original

{{ commentDetails.content }}

Yami
すべてを表示します

{{ formatTime(commentDetails.in_dtm) }} 購入済み {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

最低でも単語一つを入力してください

コメント{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}非表示にします

{{ strLimit(reply,800) }}すべて見る

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

最低でも単語一つを入力してください

キャンセル

これまでのコメントは以上です!

レビューを書きます
商品評価

コメントをお願いします

  • 素敵なユーザーネームは、あなたのコメントをより人気のあるものにします!
  • ここでニックネームを変更すると、アカウントのニックネームも同じに変更されます。
商品レビューをありがとうございます。
あなたの素晴らしいレビューは私たちのコミュニティがより良いアジア商品を見つけるのに役立ちます。

通報します

キャンセル

本当にレビューを削除してもよろしいですか?

キャンセル

過去に閲覧した商品

ブランドについて

Jingdong book