چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

سی‌پلاس‌پلاس مطلق به همراه MyProgrammingLab با Pearson eText - بسته کارت دسترسی (ویرایش پنجم)

Absolute C++ plus MyProgrammingLab with Pearson eText -- Access Card Package (5th Edition)

Mock, Kenrick;Savitch, Walter J

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۲
فرمت
PDF
زبان
انگلیسی
حجم فایل
۶٫۲ مگابایت

دربارهٔ کتاب

Praised for providing an engaging balance of thoughtful examples and explanatory discussion, best-selling author Walter Savitch explains concepts and techniques in a straightforward style using understandable language and code enhanced by a suite of pedagogical tools. Absolute C++ is appropriate for both introductory and intermediate C++ programmers. This edition is available with MyProgrammingLab, an innovative online homework and assessment tool. Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming. Note: If you are purchasing the standalone text or electronic version, MyProgrammingLab does not come automatically packaged with the text. To purchase MyProgrammingLab, please visit: myprogramminglab.com or you can purchase a package of the physical text + MyProgrammingLab by searching for ISBN 10: 0132989921 / ISBN 13: 9780132989923.¿ MyProgrammingLab is not a self-paced technology and should only be purchased when required by an instructor. Cover 1 Title Page 5 Copyright Page 6 Preface 7 Acknowledgments 10 Brief Contents 15 Contents 17 Chapter 1 C++ Basics 31 1.1 INTRODUCTION TO C++ 32 Origins of the C++ Language 32 C++ and Object-Oriented Programming 33 The Character of C++ 33 C++ Terminology 34 A Sample C++ Program 34 1.2 VARIABLES, EXPRESSIONS, AND ASSIGNMENT STATEMENTS 36 Identifiers 37 Variables 38 Assignment Statements 40 Introduction to the string class 42 PITFALL: Uninitialized Variables 42 TIP: Use Meaningful Names 43 More Assignment Statements 44 Assignment Compatibility 45 Literals 46 Escape Sequences 47 Naming Constants 47 Arithmetic Operators and Expressions 49 Integer and Floating-Point Division 51 PITFALL: Division with Whole Numbers 52 Type Casting 53 Increment and Decrement Operators 55 PITFALL: Order of Evaluation 57 1.3 CONSOLE INPUT/OUTPUT 58 Output Using cout 58 New Lines in Output 59 TIP: End Each Program with \n or endl 60 Formatting for Numbers with a Decimal Point 60 Output with cerr 62 Input Using cin 62 TIP: Line Breaks in I/O 65 1.4 PROGRAM STYLE 66 Comments 66 1.5 LIBRARIES AND NAMESPACES 67 Libraries and include Directives 67 Namespaces 67 PITFALL: Problems with Library Names 68 Chapter Summary 69 Answers to Self-Test Exercises 70 Programming Projects 72 Chapter 2 Flow of Control 75 2.1 BOOLEAN EXPRESSIONS 76 Building Boolean Expressions 76 PITFALL: Strings of Inequalities 77 Evaluating Boolean Expressions 78 Precedence Rules 80 PITFALL: Integer Values Can Be Used as Boolean Values 84 2.2 BRANCHING MECHANISMS 86 if-else Statements 86 Compound Statements 88 PITFALL: Using = in Place of == 89 Omitting the else 91 Nested Statements 91 Multiway if-else Statement 91 The switch Statement 92 PITFALL: Forgetting a break in a switch Statement 95 TIP: Use switch Statements for Menus 95 Enumeration Types 96 The Conditional Operator 96 2.3 LOOPS 97 The while and do-while Statements 98 Increment and Decrement Operators Revisited 101 The Comma Operator 102 The for Statement 104 TIP: Repeat-N-Times Loops 106 PITFALL: Extra Semicolon in a for Statement 107 PITFALL: Infinite Loops 107 The break and continue Statements 110 Nested Loops 113 2.4 INTRODUCTION TO FILE INPUT 113 Reading From a Text File Using ifstream 114 Chapter Summary 117 Answers to Self-Test Exercises 117 Programming Projects 123 Chapter 3 Function Basics 129 3.1 PREDEFINED FUNCTIONS 130 Predefined Functions That Return a Value 130 Predefined void Functions 135 A Random Number Generator 137 3.2 PROGRAMMER-DEFINED FUNCTIONS 141 Defining Functions That Return a Value 142 Alternate Form for Function Declarations 144 PITFALL: Arguments in the Wrong Order 145 PITFALL: Use of the Terms Parameter and Argument 145 Functions Calling Functions 145 EXAMPLE: A Rounding Function 145 Functions That Return a Boolean Value 148 Defining void Functions 149 return Statements in void Functions 151 Preconditions and Postconditions 151 main Is a Function 153 Recursive Functions 153 3.3 SCOPE RULES 155 Local Variables 155 Procedural Abstraction 157 Global Constants and Global Variables 158 Blocks 161 Nested Scopes 162 TIP: Use Function Calls in Branching and Loop Statements 162 Variables Declared in a for Loop 163 Chapter Summary 164 Answers to Self-Test Exercises 164 Programming Projects 168 Chapter 4 Parameters and Overloading 175 4.1 PARAMETERS 176 Call-by-Value Parameters 176 A First Look at Call-by-Reference Parameters 178 Call-by-Reference Mechanism in Detail 181 Constant Reference Parameters 183 EXAMPLE: The swapValues Function 183 TIP: Think of Actions, Not Code 184 Mixed Parameter Lists 185 TIP: What Kind of Parameter to Use 186 PITFALL: Inadvertent Local Variables 188 TIP: Choosing Formal Parameter Names 189 EXAMPLE: Buying Pizza 190 4.2 OVERLOADING AND DEFAULT ARGUMENTS 193 Introduction to Overloading 193 PITFALL: Automatic Type Conversion and Overloading 196 Rules for Resolving Overloading 197 EXAMPLE: Revised Pizza-Buying Program 199 Default Arguments 201 4.3 TESTING AND DEBUGGING FUNCTIONS 203 The assert Macro 203 Stubs and Drivers 204 Chapter Summary 207 Answers to Self-Test Exercises 207 Programming Projects 209 Chapter 5 Arrays 215 5.1 INTRODUCTION TO ARRAYS 216 Declaring and Referencing Arrays 216 TIP: Use for Loops with Arrays 219 PITFALL: Array Indexes Always Start with Zero 219 TIP: Use a Defined Constant for the Size of an Array 219 Arrays in Memory 220 PITFALL: Array Index out of Range 222 Initializing Arrays 222 5.2 ARRAYS IN FUNCTIONS 225 Indexed Variables as Function Arguments 225 Entire Arrays as Function Arguments 226 The const Parameter Modifier 230 PITFALL: Inconsistent Use of const Parameters 231 Functions That Return an Array 232 EXAMPLE: Production Graph 232 5.3 PROGRAMMING WITH ARRAYS 237 Partially Filled Arrays 237 TIP: Do Not Skimp on Formal Parameters 238 EXAMPLE: Searching an Array 241 EXAMPLE: Sorting an Array 243 5.4 MULTIDIMENSIONAL ARRAYS 248 Multidimensional Array Basics 248 Multidimensional Array Parameters 249 EXAMPLE: Two-Dimensional Grading Program 250 Chapter Summary 255 Answers to Self-Test Exercises 256 Programming Projects 260 Chapter 6 Structures and Classes 269 6.1 STRUCTURES 270 Structure Types 272 PITFALL: Forgetting a Semicolon in a Structure Definition 276 Structures as Function Arguments 276 TIP: Use Hierarchical Structures 277 Initializing Structures 279 6.2 CLASSES 282 Defining Classes and Member Functions 282 Encapsulation 288 Public and Private Members 289 Accessor and Mutator Functions 292 TIP: Separate Interface and Implementation 294 TIP: A Test for Encapsulation 295 Structures versus Classes 296 TIP: Thinking Objects 298 Chapter Summary 298 Answers to Self-Test Exercises 299 Programming Projects 301 Chapter 7 Constructors and Other Tools 305 7.1 CONSTRUCTORS 306 Constructor Definitions 306 PITFALL: Constructors with No Arguments 311 Explicit Constructor Calls 312 TIP: Always Include a Default Constructor 313 EXAMPLE: BankAccount Class 315 Class Type Member Variables 322 7.2 MORE TOOLS 325 The const Parameter Modifier 325 PITFALL: Inconsistent Use of const 327 Inline Functions 331 Static Members 333 Nested and Local Class Definitions 336 7.3 VECTORS—A PREVIEW OF THE STANDARD TEMPLATE LIBRARY 337 Vector Basics 337 PITFALL: Using Square Brackets beyond the Vector Size 339 TIP: Vector Assignment Is Well Behaved 341 Efficiency Issues 341 Chapter Summary 343 Answers to Self-Test Exercises 343 Programming Projects 345 Chapter 8 Operator Overloading, Friends, and References 351 8.1 BASIC OPERATOR OVERLOADING 352 Overloading Basics 353 TIP: A Constructor Can Return an Object 358 Returning by const Value 359 Overloading Unary Operators 362 Overloading as Member Functions 362 TIP: A Class Has Access to All Its Objects 365 Overloading Function Application ( ) 365 PITFALL: Overloading &&, ||, and the Comma Operator 366 8.2 FRIEND FUNCTIONS AND AUTOMATIC TYPE CONVERSION 366 Constructors for Automatic Type Conversion 366 PITFALL: Member Operators and Automatic Type Conversion 367 Friend Functions 368 Friend Classes 371 PITFALL: Compilers without Friends 372 8.3 REFERENCES AND MORE OVERLOADED OPERATORS 373 References 374 TIP: Returning Member Variables of a Class Type 375 Overloading >> and > variable; and getline 429 String Processing with the Class string 431 EXAMPLE: Palindrome Testing 434 Converting between string Objects and C-Strings 438 Chapter Summary 439 Answers to Self-Test Exercises 439 Programming Projects 443 Chapter 10 Pointers and Dynamic Arrays 449 10.1 POINTERS 450 Pointer Variables 451 Basic Memory Management 459 PITFALL: Dangling Pointers 462 Dynamic Variables and Automatic Variables 462 TIP: Define Pointer Types 463 PITFALL: Pointers as Call-by-Value Parameters 465 Uses for Pointers 466 10.2 DYNAMIC ARRAYS 467 Array Variables and Pointer Variables 467 Creating and Using Dynamic Arrays 469 EXAMPLE: A Function That Returns an Array 472 Pointer Arithmetic 474 Multidimensional Dynamic Arrays 475 10.3 CLASSES, POINTERS, AND DYNAMIC ARRAYS 478 The -> Operator 478 The this Pointer 479 Overloading the Assignment Operator 479 EXAMPLE: A Class for Partially Filled Arrays 486 Destructors 489 Copy Constructors 490 Chapter Summary 495 Answers to Self-Test Exercises 495 Programming Projects 497 Chapter 11 Separate Compilation and Namespaces 501 11.1 SEPARATE COMPILATION 502 Encapsulation Reviewed 503 Header Files and Implementation Files 503 EXAMPLE: DigitalTime Class 512 TIP: Reusable Components 513 Using #ifndef 513 TIP: Defining Other Libraries 515 11.2 NAMESPACES 517 Namespaces and using Directives 517 Creating a Namespace 519 using Declarations 522 Qualifying Names 523 TIP: Choosing a Name for a Namespace 525 EXAMPLE: A Class Definition in a Namespace 526 Unnamed Namespaces 527 PITFALL: Confusing the Global Namespace and the Unnamed Namespace 533 TIP: Unnamed Namespaces Replace the static Qualifier 534 TIP: Hiding Helping Functions 534 Nested Namespaces 535 TIP: What Namespace Specification Should You Use? 535 Chapter Summary 538 Answers to Self-Test Exercises 538 Programming Projects 540 Chapter 12 Streams and File I/O 545 12.1 I/O STREAMS 547 File I/O 547 PITFALL: Restrictions on Stream Variables 552 Appending to a File 552 TIP: Another Syntax for Opening a File 554 TIP: Check That a File Was Opened Successfully 556 Character I/O 558 Checking for the End of a File 559 12.2 TOOLS FOR STREAM I/O 563 File Names as Input 563 Formatting Output with Stream Functions 564 Manipulators 568 Saving Flag Settings 569 More Output Stream Member Functions 570 EXAMPLE: Cleaning Up a File Format 572 EXAMPLE: Editing a Text File 574 12.3 STREAM HIERARCHIES: A PREVIEW OF INHERITANCE 577 Inheritance among Stream Classes 577 EXAMPLE: Another newLine Function 579 Parsing Strings with the stringstream Class 583 12.4 RANDOM ACCESS TO FILES 586 Chapter Summary 588 Answers to Self-Test Exercises 588 Programming Projects 591 Chapter 13 Recursion 601 13.1 RECURSIVE void FUNCTIONS 603 EXAMPLE: Vertical Numbers 603 Tracing a Recursive Call 606 A Closer Look at Recursion 609 PITFALL: Infinite Recursion 610 Stacks for Recursion 612 PITFALL: Stack Overflow 613 Recursion versus Iteration 614 13.2 RECURSIVE FUNCTIONS THAT RETURN A VALUE 615 General Form for a Recursive Function That Returns a Value 615 EXAMPLE: Another Powers Function 616 Mutual Recursion 621 13.3 THINKING RECURSIVELY 623 Recursive Design Techniques 623 Binary Search 624 Coding 626 Checking the Recursion 630 Efficiency 630 Chapter Summary 632 Answers to Self-Test Exercises 633 Programming Projects 637 Chapter 14 Inheritance 643 14.1 INHERITANCE BASICS 644 Derived Classes 644 Constructors in Derived Classes 654 PITFALL: Use of Private Member Variables from the Base Class 656 PITFALL: Private Member Functions Are Effectively Not Inherited 658 The protected Qualifier 658 Redefinition of Member Functions 661 Redefining versus Overloading 662 Access to a Redefined Base Function 664 Functions That Are Not Inherited 665 14.2 PROGRAMMING WITH INHERITANCE 666 Assignment Operators and Copy Constructors in Derived Classes 666 Destructors in Derived Classes 667 EXAMPLE: Partially Filled Array with Backup 668 PITFALL: Same Object on Both Sides of the Assignment Operator 677 EXAMPLE: Alternate Implementation of PFArrayDBak 677 TIP: A Class Has Access to Private Members of All Objects of the Class 680 TIP: “Is a” versus “Has a” 680 Protected and Private Inheritance 681 Multiple Inheritance 682 Chapter Summary 683 Answers to Self-Test Exercises 683 Programming Projects 685 Chapter 15 Polymorphism and Virtual Functions 691 15.1 VIRTUAL FUNCTION BASICS 692 Late Binding 692 Virtual Function in C++ 693 TIP: The Virtual Property Is Inherited 699 TIP: When to Use a Virtual Function 700 PITFALL: Omitting the Definition of a Virtual Member Function 700 Abstract Classes and Pure Virtual Functions 701 EXAMPLE: An Abstract Class 702 15.2 POINTERS AND VIRTUAL FUNCTIONS 704 Virtual Functions and Extended Type Compatibility 704 PITFALL: The Slicing Problem 708 TIP: Make Destructors Virtual 709 Downcasting and Upcasting 710 How C++ Implements Virtual Functions 711 Chapter Summary 713 Answers to Self-Test Exercises 714 Programming Projects 714 Chapter 16 Templates 723 16.1 FUNCTION TEMPLATES 724 Syntax for Function Templates 725 PITFALL: Compiler Complications 728 TIP: How to Define Templates 730 EXAMPLE: A Generic Sorting Function 731 PITFALL: Using a Template with an Inappropriate Type 735 16.2 CLASS TEMPLATES 737 Syntax for Class Templates 738 EXAMPLE: An Array Template Class 742 The vector and basic_string Templates 748 16.3 TEMPLATES AND INHERITANCE 748 EXAMPLE: Template Class For a Partially Filled Array with Backup 749 Chapter Summary 754 Answers to Self-Test Exercises 754 Programming Projects 758 Chapter 17 Linked Data Structures 761 17.1 NODES AND LINKED LISTS 763 Nodes 763 Linked Lists 768 Inserting a Node at the Head of a List 770 PITFALL: Losing Nodes 773 Inserting and Removing Nodes Inside a List 773 PITFALL: Using the Assignment Operator with Dynamic Data Structures 777 Searching a Linked List 777 Doubly Linked Lists 780 Adding a Node to a Doubly Linked List 782 Deleting a Node from a Doubly Linked List 782 EXAMPLE: A Generic Sorting Template Version of Linked List Tools 789 17.2 LINKED LIST APPLICATIONS 793 EXAMPLE: A Stack Template Class 793 EXAMPLE: A Queue Template Class 800 TIP: A Comment on Namespaces 803 Friend Classes and Similar Alternatives 804 EXAMPLE: Hash Tables With Chaining 807 Efficiency of Hash Tables 813 EXAMPLE: A Set Template Class 814 Efficiency of Sets Using Linked Lists 820 17.3 ITERATORS 821 Pointers as Iterators 822 Iterator Classes 822 EXAMPLE: An Iterator Class 824 17.4 TREES 830 Tree Properties 831 EXAMPLE: A Tree Template Class 833 Chapter Summary 838 Answers to Self-Test Exercises 839 Programming Projects 848 Chapter 18 Exception Handling 855 18.1 EXCEPTION HANDLING BASICS 857 A Toy Example of Exception Handling 857 Defining Your Own Exception Classes 866 Multiple Throws and Catches 866 PITFALL: Catch the More Specific Exception First 870 TIP: Exception Classes Can Be Trivial 871 Throwing an Exception in a Function 871 Exception Specification 873 PITFALL: Exception Specification in Derived 875 18.2 PROGRAMMING TECHNIQUES FOR EXCEPTION HANDLING 876 When to Throw an Exception 877 PITFALL: Uncaught Exceptions 878 PITFALL: Nested try-catch Blocks 879 PITFALL: Overuse of Exceptions 879 Exception Class Hierarchies 880 Testing for Available Memory 880 Rethrowing an Exception 881 Chapter Summary 881 Answers to Self-Test Exercises 881 Programming Projects 883 Chapter 19 Standard Template Library 887 19.1 ITERATORS 889 Iterator Basics 889 PITFALL: Compiler Problems 894 Kinds of Iterators 895 Constant and Mutable Iterators 898 Reverse Iterators 900 Other Kinds of Iterators 901 19.2 CONTAINERS 902 Sequential Containers 902 PITFALL: Iterators and Removing Elements 907 TIP: Type Definitions in Containers 908 The Container Adapters stack and queue 908 PITFALL: Underlying Containers 909 The Associative Containers set and map 912 Efficiency 917 19.3 GENERIC ALGORITHMS 919 Running Times and Big-O Notation 920 Container Access Running Times 924 Nonmodifying Sequence Algorithms 925 Modifying Sequence Algorithms 929 Set Algorithms 930 Sorting Algorithms 932 Chapter Summary 932 Answers to Self-Test Exercises 933 Programming Projects 935 Chapter 20 Patterns and UML 943 Appendix 1 C++ Keywords 945 Appendix 2 Precedence of Operators 947 Appendix 3 The ASCII Character Set 949 Appendix 4 Some Library Functions 951 Appendix 5 Old and New Header Files 959 Index 961 A 961 B 963 C 963 D 965 E 966 F 967 G 969 H 969 I 969 K 971 L 971 M 972 N 973 O 973 P 975 Q 976 R 976 S 977 T 979 U 980 V 980 W 981 Z 981

Praised for providing an engaging balance of thoughtful examples and explanatory discussion, best-selling author Walter Savitch explains concepts and techniques in a straightforward style using understandable language and code enhanced by a suite of pedagogical tools. Absolute C++ is appropriate for both introductory and intermediate C++ programmers.

This edition is available with MyProgrammingLab, an innovative online homework and assessment tool. Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming.


Note: If you are purchasing the standalone text or electronic version, MyProgrammingLab does not come automatically packaged with the text. To purchase MyProgrammingLab, please visit: myprogramminglab.com or you can purchase a package of the physical text + MyProgrammingLab by searching for ISBN 10: 0132989921 / ISBN 13: 9780132989923.¿ MyProgrammingLab is not a self-paced technology and should only be purchased when required by an instructor.

کتاب‌های مشابه

مستری آناتومی انسانی: کارت دسترسی بسته ارزشمند با Pearson eText - به‌روزرسانی رسانه (جزء me)

مستری آناتومی انسانی: کارت دسترسی بسته ارزشمند با Pearson eText - به‌روزرسانی رسانه (جزء me)

۴۹٬۰۰۰ تومان

تسلط بر تغذیه با MyDietAnalysis با دسترسی به Pearson eText -- کارت دسترسی ValuePack -- برای علم تغذیه

تسلط بر تغذیه با MyDietAnalysis با دسترسی به Pearson eText -- کارت دسترسی ValuePack -- برای علم تغذیه

۴۹٬۰۰۰ تومان

سی‌پلاس‌پلاس و پایتون: ترفندها و نکات

سی‌پلاس‌پلاس و پایتون: ترفندها و نکات

۴۹٬۰۰۰ تومان

سی‌پلاس‌پلاس مؤثر: ۵۵ راهکار مشخص برای بهبود برنامه‌ها و طراحی‌ها (ویرایش سوم)

سی‌پلاس‌پلاس مؤثر: ۵۵ راهکار مشخص برای بهبود برنامه‌ها و طراحی‌ها (ویرایش سوم)

۴۹٬۰۰۰ تومان

میکروبیولوژی با بیماری‌ها بر اساس سیستم‌های بدنی به همراه MasteringMicrobiology با بسته کارت دسترسی (ویرایش سوم) (سری MasteringMicrobiology)

میکروبیولوژی با بیماری‌ها بر اساس سیستم‌های بدنی به همراه MasteringMicrobiology با بسته کارت دسترسی (ویرایش سوم) (سری MasteringMicrobiology)

۴۹٬۰۰۰ تومان

Absolute C++ plus MyProgrammingLab with Pearson eText -- Access Card Package (5th Edition)

Absolute C++ plus MyProgrammingLab with Pearson eText -- Access Card Package (5th Edition)

۴۹٬۰۰۰ تومان

ارتباطات فنی ۱۰ و مدل‌های چندرسانه‌ای (کارت دسترسی)

ارتباطات فنی ۱۰ و مدل‌های چندرسانه‌ای (کارت دسترسی)

۴۹٬۰۰۰ تومان

کارت کد دسترسی برای کلاس درس Adobe Animate

کارت کد دسترسی برای کلاس درس Adobe Animate

۴۹٬۰۰۰ تومان

Starting Out with C++ Early Objects plus MyProgrammingLab with Pearson eText -- Access Card Package (8th Edition)

Starting Out with C++ Early Objects plus MyProgrammingLab with Pearson eText -- Access Card Package (8th Edition)

۴۹٬۰۰۰ تومان

Starting Out with C++ Early Objects plus MyProgrammingLab with Pearson eText -- Access Card Package (8th Edition)

Starting Out with C++ Early Objects plus MyProgrammingLab with Pearson eText -- Access Card Package (8th Edition)

۴۹٬۰۰۰ تومان

نسخهٔ بهبود یافتهٔ کد مطلق C++

نسخهٔ بهبود یافتهٔ کد مطلق C++

۴۹٬۰۰۰ تومان

Essentials of Statistics Plus MyLab Statistics with Pearson eText -- Access Card Package (5th Edition)

Essentials of Statistics Plus MyLab Statistics with Pearson eText -- Access Card Package (5th Edition)

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۴٬۰۰۰ تومان