In A Tour of C++, Third Edition, Bjarne Stroustrup provides an overview of ISO C++, C++20, that aims to give experienced programmers a clear understanding of what constitutes modern C++. Featuring carefully crafted examples and practical help in getting started, this revised and updated edition concisely covers most major language features and the major standard-library components needed for effective use. Stroustrup presents C++ features in the context of the programming styles they support, such as object-oriented and generic programming. His tour is remarkably comprehensive. Coverage begins with the basics, then ranges widely through more advanced topics, emphasizing newer language features. This edition covers many features that are new in C++20 as implemented by major C++ suppliers, including modules, concepts, coroutines, and ranges. It even introduces some library components in current use that are not scheduled for inclusion in the standard until C++23. This authoritative guide does not aim to teach you how to program (for that, see Stroustrup's Programming: Principles and Practice Using C++, Second Edition), nor will it be the only resource you'll need for C++ mastery (for that, see Stroustrup's The C++ Programming Language, Fourth Edition, and recommended online sources). If, however, you are a C or C++ programmer wanting greater familiarity with the current C++ language, or a programmer versed in another language wishing to gain an accurate picture of the nature and benefits of modern C++, you won't find a shorter or simpler introduction.
Les mer
Preface xi Chapter 1: The Basics 11.1 Introduction 11.2 Programs 21.3 Functions 41.4 Types, Variables, and Arithmetic 51.5 Scope and Lifetime 91.6 Constants 101.7 Pointers, Arrays, and References 111.8 Tests 141.9 Mapping to Hardware 161.10 Advice 19 Chapter 2: User-Defined Types 212.1 Introduction 212.2 Structures 222.3 Classes 232.4 Enumerations 252.5 Unions 272.6 Advice 28 Chapter 3: Modularity 293.1 Introduction 293.2 Separate Compilation 303.3 Namespaces 353.4 Function Arguments and Return Values 373.5 Advice 42 Chapter 4: Error Handling 434.1 Introduction 434.2 Exceptions 444.3 Invariants 454.4 Error-Handling Alternatives 474.5 Assertions 484.6 Advice 51 Chapter 5: Classes 535.1 Introduction 535.2 Concrete Types 545.3 Abstract Types 605.4 Virtual Functions 625.5 Class Hierarchies 635.6 Advice 69 Chapter 6: Essential Operations 716.1 Introduction 716.2 Copy and Move 746.3 Resource Management 786.4 Operator Overloading 806.5 Conventional Operations 816.6 User-Defined Literals 846.7 Advice 85 Chapter 7: Templates 877.1 Introduction 877.2 Parameterized Types 887.3 Parameterized Operations 937.4 Template Mechanisms 997.5 Advice 102 Chapter 8: Concepts and Generic Programming 1038.1 Introduction 1038.2 Concepts 1048.3 Generic Programming 1128.4 Variadic Templates 1148.5 Template Compilation Model 1178.6 Advice 117 Chapter 9: Library Overview 1199.1 Introduction 1199.2 Standard-Library Components 1209.3 Standard-Library Organization 1219.4 Advice 124 Chapter 10: Strings and Regular Expressions 12510.1 Introduction 12510.2 Strings 12510.3 String Views 12810.4 Regular Expressions 13010.5 Advice 136 Chapter 11: Input and Output 13711.1 Introduction 13711.2 Output 13811.3 Input 13911.4 I/O State 14111.5 I/O of User-Defined Types 14111.6 Output Formatting 14311.7 Streams 14611.8 C-style I/O 14911.9 File System 15011.10 Advice 154 Chapter 12: Containers 15712.1 Introduction 15712.2 vector 15812.3 list 16212.4 forward_list 16412.5 map 16412.6 unordered_map 16512.7 Allocators 16712.8 Container Overview 16812.9 Advice 170 Chapter 13: Algorithms 17313.1 Introduction 17313.2 Use of Iterators 17513.3 Iterator Types 17813.4 Use of Predicates 18113.5 Algorithm Overview 18113.6 Parallel Algorithms 18313.7 Advice 183 Chapter 14: Ranges 18514.1 Introduction 18514.2 Views 18614.3 Generators 18814.4 Pipelines 18814.5 Concepts Overview 19014.6 Advice 194 Chapter 15: Pointers and Containers 19515.1 Introduction 19515.2 Pointers 19615.3 Containers 20115.4 Alternatives 20815.5 Advice 212 Chapter 16: Utilities 21316.1 Introduction 21316.2 Time 21416.3 Function Adaption 21616.4 Type Functions 21716.5 source_location 22216.6 move() and forward() 22316.7 Bit Manipulation 22416.8 Exiting a Program 22516.9 Advice 225 Chapter 17: Numerics 22717.1 Introduction 22717.2 Mathematical Functions 22817.3 Numerical Algorithms 22917.4 Complex Numbers 23017.5 Random Numbers 23117.6 Vector Arithmetic 23317.7 Numeric Limits 23417.8 Type Aliases 23417.9 Mathematical Constants 23417.10 Advice 235 Chapter 18: Concurrency 23718.1 Introduction 23718.2 Tasks and threads 23818.3 Sharing Data 24118.4 Waiting for Events 24318.5 Communicating Tasks 24518.6 Coroutines 25018.8 Advice 253 Chapter 19: History and Compatibility 25519.1 History 25519.2 C++ Feature Evolution 26319.3 C/C++ Compatibility 26819.4 Bibliography 27119.5 Advice 274 Appendix: Module std 277A.1 Introduction 277A.2 Use What Your Implementation Offers 278A.3 Use Headers 278A.4 Make Your Own module std 278A.5 Advice 279 Index 281
Les mer

Produktdetaljer

ISBN
9780136816485
Publisert
2022-10-12
Utgave
3. utgave
Utgiver
Vendor
Addison Wesley
Vekt
640 gr
Høyde
234 mm
Bredde
186 mm
Dybde
20 mm
Aldersnivå
P, 06
Språk
Product language
Engelsk
Format
Product format
Heftet
Antall sider
320

Forfatter

Biographical note

Bjarne Stroustrup is the designer and original implementer of C++ and the author of Programming: Principles and Practice Using C++, Second Edition, and The C++ Programming Language, Fourth Edition, among others. Currently a professor at Columbia University, he has previously worked at AT&T Bell Labs, Texas A&M University, and Morgan Stanley. He is the recipient of numerous honors, including The National Academy of Engineering's Charles Stark Draper Prize for Engineering "for conceptualizing and developing the C++ programming language." Dr. Stroustrup is a member of the National Academy of Engineering, a fellow of IEEE, ACM, CHM, and Churchill College Cambridge.