Log in Sign up
Trang chủeBookProgramming: Principles and Practice Using C++, 2nd edition
Programming: Principles and Practice Using C++, 2nd edition

Programming: Principles and Practice Using C++, 2nd edition

BRAND: PEARSON
Publisher:
PEARSON
Author:
Bjarne Stroustrup
Edition:
(June 2, 2014) © 2014
eBook ISBN:
9780133796742
Print ISBN:
9780321992789
Type:
1 Year Subscription. Dành cho Cá nhân
eBook edition. 1 Year Subscription. Dành cho Cá nhân | Trường ĐH, Nhóm, Thư Viện: Gọi 0915920514 để báo giá Pearson, Vital Source eBook hoặc mua Sách In

Tổng quan sách

Giới thiệu về lập trình của nhà phát minh C++, Lập trình chuẩn bị cho học sinh lập trình trong thế giới thực. Cuốn sách này giả định rằng mục đích cuối cùng của họ là viết các chương trình không tầm thường, cho dù là cho công việc phát triển phần mềm hay trong một số lĩnh vực kỹ thuật khác. Nó giải thích các khái niệm và kỹ thuật cơ bản sâu hơn so với phần giới thiệu truyền thống. Cách tiếp cận này mang lại cho sinh viên một nền tảng vững chắc để viết mã hữu ích, chính xác, có thể bảo trì và hiệu quả. Cuốn sách này giới thiệu về lập trình nói chung, bao gồm lập trình hướng đối tượng và lập trình chung. Đây cũng là phần giới thiệu chắc chắn về ngôn ngữ lập trình C++, một trong những ngôn ngữ được sử dụng rộng rãi nhất cho phần mềm trong thế giới thực. Nó trình bày các kỹ thuật lập trình C++ hiện đại ngay từ đầu, giới thiệu thư viện chuẩn C++ để đơn giản hóa các tác vụ lập trình.
  1. Preface xxv
  2. Chapter 0: Notes to the Reader 10.1 The structure of this book 20.2 A philosophy of teaching and learning 60.3 Programming and computer science 120.4 Creativity and problem solving 120.5 Request for feedback 120.6 References 130.7 Biographies 13
  3. Chapter 1: Computers, People, and Programming 171.1 Introduction 181.2 Software 191.3 People 211.4 Computer science 241.5 Computers are everywhere 251.6 Ideals for programmers 34 Part I: The Basics 41
  4. Chapter 2: Hello, World! 432.1 Programs 442.2 The classic first program 452.3 Compilation 472.4 Linking 512.5 Programming environments 52
  5. Chapter 3: Objects, Types, and Values 593.1 Input 603.2 Variables 623.3 Input and type 643.4 Operations and operators 663.5 Assignment and initialization 693.6 Composite assignment operators 733.7 Names 743.8 Types and objects 773.9 Type safety 78
  6. Chapter 4: Computation 894.1 Computation 904.2 Objectives and tools 924.3 Expressions 944.4 Statements 1004.4.1 Selection 1024.4.2 Iteration 1094.5 Functions 1134.6 vector 1174.7 Language features 125
  7. Chapter 5: Errors 1335.1 Introduction 1345.2 Sources of errors 1365.3 Compile-time errors 1365.4 Link-time errors 1395.5 Run-time errors 1405.6 Exceptions 1465.7 Logic errors 1545.8 Estimation 1575.9 Debugging 1585.10 Pre- and post-conditions 1635.11 Testing 166
  8. Chapter 6: Writing a Program 1736.1 A problem 1746.2 Thinking about the problem 1756.3 Back to the calculator! 1786.4 Grammars 1886.5 Turning a grammar into code 1956.6 Trying the first version 2036.7 Trying the second version 2086.8 Token streams 2096.9 Program structure 215
  9. Chapter 7: Completing a Program 2217.1 Introduction 2227.2 Input and output 2227.3 Error handling 2247.4 Negative numbers 2297.5 Remainder: % 2307.6 Cleaning up the code 2327.7 Recovering from errors 2397.8 Variables 242
  10. Chapter 8: Technicalities: Functions, etc. 2558.1 Technicalities 2568.2 Declarations and definitions 2578.3 Header files 2648.4 Scope 2668.5 Function call and return 2728.6 Order of evaluation 2918.7 Namespaces 294
  11. Chapter 9: Technicalities: Classes, etc. 3039.1 User-defined types 3049.2 Classes and members 3059.3 Interface and implementation 3069.4 Evolving a class 3089.5 Enumerations 3189.6 Operator overloading 3219.7 Class interfaces 3239.8 The Date class 334Part II Input and Output 343
  12. Chapter 10: Input and Output Streams 34510.1 Input and output 34610.2 The I/O stream model 34710.3 Files 34910.4 Opening a file 35010.5 Reading and writing a file 35210.6 I/O error handling 35410.7 Reading a single value 35810.8 User-defined output operators 36310.9 User-defined input operators 36510.10 A standard input loop 36510.11 Reading a structured file 367
  13. Chapter 11: Customizing Input and Output 37911.1 Regularity and irregularity 38011.2 Output formatting 38011.3 File opening and positioning 38811.4 String streams 39411.5 Line-oriented input 39511.6 Character classification 39611.7 Using nonstandard separators 39811.8 And there is so much more 406
  14. Chapter 12: A Display Model 41112.1 Why graphics? 41212.2 A display model 41312.3 A first example 41412.4 Using a GUI library 41812.5 Coordinates 41912.6 Shapes 42012.7 Using Shape primitives 42112.8 Getting this to run 435
  15. Chapter 13: Graphics Classes 44113.1 Overview of graphics classes 44213.2 Point and Line 44413.3 Lines 44713.4 Color 45013.5 Line_style 45213.6 Open_polyline 45513.7 Closed_polyline 45613.8 Polygon 45813.9 Rectangle 46013.10 Managing unnamed objects 46513.11 Text 46713.12 Circle 47013.13 Ellipse 47213.14 Marked_polyline 47413.15 Marks 47613.16 Mark 47813.17 Images 479
  16. Chapter 14: Graphics Class Design 48714.1 Design principles 48814.2 Shape 49314.3 Base and derived classes 50414.4 Benefits of object-oriented programming 513
  17. Chapter 15: Graphing Functions and Data 51915.1 Introduction 52015.2 Graphing simple functions 52015.3 Function 52415.4 Axis 52915.5 Approximation 53215.6 Graphing data 537
  18. Chapter 16: Graphical User Interfaces 55116.1 User interface alternatives 55216.2 The “Next” button 55316.3 A simple window 55416.4 Button and other Widgets 56116.5 An example 56516.6 Control inversion 56916.7 Adding a menu 57016.8 Debugging GUI code 575 Part III: Data and Algorithms 581
  19. Chapter 17: Vector and Free Store 58317.1 Introduction 58417.2 vector basics 58617.3 Memory, addresses, and pointers 58817.4 Free store and pointers 59117.5 Destructors 60117.6 Access to elements 60517.7 Pointers to class objects 60617.8 Messing with types: void* and casts 60817.9 Pointers and references 61017.10 The this pointer 618
  20. Chapter 18: Vectors and Arrays 62718.1 Introduction 62818.2 Initialization 62918.3 Copying 63118.4 Essential operations 64018.5 Access to vector elements 64618.5.1 Overloading on const 64718.6 Arrays 64818.7 Examples: palindrome 659
  21. Chapter 19: Vector, Templates, and Exceptions 66719.1 The problems 66819.2 Changing size 67119.3 Templates 67819.4 Range checking and exceptions 69319.5 Resources and exceptions 697
  22. Chapter 20: Containers and Iterators 71120.1 Storing and processing data 71220.2 STL ideals 71720.3 Sequences and iterators 72020.4 Linked lists 72420.5 Generalizing vector yet again 72920.6 An example: a simple text editor 73420.7 vector, list, and string 74120.8 Adapting our vector to the STL 74520.9 Adapting built-in arrays to the STL 74720.10 Container overview 749
  23. Chapter 21: Algorithms and Maps 75721.1 Standard library algorithms 75821.2 The simplest algorithm: find() 75921.3 The general search: find_if() 76321.4 Function objects 76521.5 Numerical algorithms 77021.6 Associative containers 77621.7 Copying 78921.8 Sorting and searching 79421.9 Container algorithms 797 Part IV: Broadening the View 803
  24. Chapter 22: Ideals and History 80522.1 History, ideals, and professionalism 80622.2 Programming language history overview 818
  25. Chapter 23: Text Manipulation 84923.1 Text 85023.2 Strings 85023.3 I/O streams 85523.4 Maps 85523.5 A problem 86423.6 The idea of regular expressions 86623.7 Searching with regular expressions 86923.8 Regular expression syntax 87223.9 Matching with regular expressions 88023.10 References 885
  26. Chapter 24: Numerics 88924.1 Introduction 89024.2 Size, precision, and overflow 89024.3 Arrays 89524.4 C-style multidimensional arrays 89624.5 The Matrix library 89724.6 An example: solving linear equations 90824.7 Random numbers 91424.8 The standard mathematical functions 91724.9 Complex numbers 91924.10 References 920
  27. Chapter 25: Embedded Systems Programming 92525.1 Embedded systems 92625.2 Basic concepts 92925.3 Memory management 93525.4 Addresses, pointers, and arrays 94325.5 Bits, bytes, and words 95425.6 Coding standards 974
  28. Chapter 26: Testing 98926.1 What we want 99026.2 Proofs 99226.3 Testing 99226.4 Design for testing 101126.5 Debugging 101226.6 Performance 101226.7 References 1016
  29. Chapter 27: The C Programming Language 102127.1 C and C++: siblings 102227.2 Functions 102827.3 Minor language differences 103627.4 Free store 104327.5 C-style strings 104527.6 Input/output: stdio 105027.7 Constants and macros 105427.8 Macros 105527.9 An example: intrusive containers 1059 Part V: Appendices 1071 Appendix A: Language Summary 1073A.1 General 1074A.2 Literals 1077A.3 Identifiers 1081A.4 Scope, storage class, and lifetime 1082A.5 Expressions 1086A.6 Statements 1096A.7 Declarations 1098A.8 Built-in types 1099A.9 Functions 1103A.10 User-defined types 1106A.11 Enumerations 1107A.12 Classes 1108A.13 Templates 1121A.14 Exceptions 1125A.15 Namespaces 1127A.16 Aliases 1128A.17 Preprocessor directives 1128 Appendix B: Standard Library Summary 1131B.1 Overview 1132B.2 Error handling 1137B.3 Iterators 1139B.4 Containers 1144B.5 Algorithms 1152B.6 STL utilities 1162B.7 I/O streams 1168B.8 String manipulation 1175B.9 Numerics 1180B.10 Time 1185B.11 C standard library functions 1185B.12 Other libraries 1195 Appendix C: Getting Started with Visual Studio 1197C.1 Getting a program to run 1198C.2 Installing Visual Studio 1198C.3 Creating and running a program 1199C.4 Later 1201 Appendix D: Installing FLTK 1203D.1 Introduction 1204D.2 Downloading FLTK 1204D.3 Installing FLTK 1205D.4 Using FLTK in Visual Studio 1205D.5 Testing if it all worked 1206 Appendix E: GUI Implementation 1207E.1 Callback implementation 1208E.2 Widget implementation 1209E.3 Window implementation 1210E.4 Vector_ref 1212E.5 An example: manipulating Widgets 1213 Glossary 1217Bibliography 1223Index 1227
Chat Zalo