Nicht aus der Schweiz? Besuchen Sie lehmanns.de

Professional C++ (eBook)

eBook Download: EPUB
2023 | 6. Auflage
1376 Seiten
Wiley (Verlag)
978-1-394-19318-9 (ISBN)

Lese- und Medienproben

Professional C++ -  Marc Gregoire
Systemvoraussetzungen
53,99 inkl. MwSt
(CHF 52,75)
Der eBook-Verkauf erfolgt durch die Lehmanns Media GmbH (Berlin) zum Preis in Euro inkl. MwSt.
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

Expand your C++ toolkit quickly and efficiently with this advanced resource

In the newly revised sixth edition of Professional C++, veteran software engineer and developer Marc Gregoire delivers yet another volume that raises the bar for advanced programming manuals. Covering the major new revisions contained in the new C++ standard codenamed C++23, the book offers case studies with working code that's been tested in Windows and Linux.

The leading resource for dedicated and knowledgeable professionals seeking to advance their C++ skills, this book provides resources that help readers:

  • Maximize C++ capabilities with effective design solutions
  • Master little-known elements and learn what practices to avoid
  • Adopt new workarounds and testing/debugging best practices
  • Use real-world program segments in your own applications

C++ is a complex and unforgiving language. Professional C++, 6th Edition, allows dedicated practitioners to remain current and abreast of the latest developments and advances.

MARC GREGOIRE is a software engineer and developer of C/C++ applications for both Windows and Linux. He is a Microsoft MVP, the founder of the Belgian C++ users group, and is currently working on X-ray, CT, and 3-D geometric inspection software for Nikon Metrology. He previously worked on critical 2G and 3G telecom software for Siemens and Nokia Siemens Networks. Marc is the author of Professional C++ 2nd, 3rd, 4th, and 5th editions, co-author of C++ Standard Library Quick Reference, technical editor on numerous books and articles, and maintains a blog at nuonsoft.com/blog.

MARC GREGOIRE is a software engineer and developer of C/C++ applications for both Windows and Linux. He is a Microsoft MVP, the founder of the Belgian C++ users group, and is currently working on X-ray, CT, and 3-D geometric inspection software for Nikon Metrology. He previously worked on critical 2G and 3G telecom software for Siemens and Nokia Siemens Networks. Marc is the author of Professional C++ 2nd, 3rd, 4th, and 5th editions, co-author of C++ Standard Library Quick Reference, technical editor on numerous books and articles, and maintains a blog at nuonsoft.com/blog.

INTRODUCTION xli

PART I: INTRODUCTION TO PROFESSIONAL C++

CHAPTER 1: A CRASH COURSE IN C++ AND THE STANDARD LIBRARY 3

CHAPTER 2: WORKING WITH STRINGS AND STRING VIEWS 87

CHAPTER 3: CODING WITH STYLE 119

PART II: PROFESSIONAL C++ SOFTWARE DESIGN

CHAPTER 4: DESIGNING PROFESSIONAL C++ PROGRAMS 145

CHAPTER 5: DESIGNING WITH CLASSES 177

CHAPTER 6: DESIGNING FOR REUSE 197

PART III: C++ CODING THE PROFESSIONAL WAY

CHAPTER 7: MEMORY MANAGEMENT 221

CHAPTER 8: GAINING PROFICIENCY WITH CLASSES AND OBJECTS 259

CHAPTER 9: MASTERING CLASSES AND OBJECTS 295

CHAPTER 10: DISCOVERING INHERITANCE TECHNIQUES 357

CHAPTER 11: MODULES, HEADER FILES, AND MISCELLANEOUS TOPICS 421

CHAPTER 12: WRITING GENERIC CODE WITH TEMPLATES 451

CHAPTER 13: DEMYSTIFYING C++ I/O 501

CHAPTER 14: HANDLING ERRORS 533

CHAPTER 15: OVERLOADING C++ OPERATORS 577

CHAPTER 16: OVERVIEW OF THE C++ STANDARD LIBRARY 619

CHAPTER 17: UNDERSTANDING ITERATORS AND THE RANGES LIBRARY 653

CHAPTER 18: STANDARD LIBRARY CONTAINERS 683

CHAPTER 19: FUNCTION POINTERS, FUNCTION OBJECTS, AND LAMBDA EXPRESSIONS 761

CHAPTER 20: MASTERING STANDARD LIBRARY ALGORITHMS 791

CHAPTER 21: STRING LOCALIZATION AND REGULAR EXPRESSIONS 831

CHAPTER 22: DATE AND TIME UTILITIES 861

CHAPTER 23: RANDOM NUMBER FACILITIES 879

CHAPTER 24: ADDITIONAL VOCABULARY TYPES 891

PART IV: MASTERING ADVANCED FEATURES OF C++

CHAPTER 25: CUSTOMIZING AND EXTENDING THE STANDARD LIBRARY 909

CHAPTER 26: ADVANCED TEMPLATES 945

CHAPTER 27: MULTITHREADED PROGRAMMING WITH C++ 985

PART V: C++ SOFTWARE ENGINEERING

CHAPTER 28: MAXIMIZING SOFTWARE ENGINEERING METHODS 1043

CHAPTER 29: WRITING EFFICIENT C++ 1065

CHAPTER 30: BECOMING ADEPT AT TESTING 1093

CHAPTER 31: CONQUERING DEBUGGING 1117

CHAPTER 32: INCORPORATING DESIGN TECHNIQUES AND FRAMEWORKS 1155

CHAPTER 33: APPLYING DESIGN PATTERNS 1179

CHAPTER 34: DEVELOPING CROSS-PLATFORM AND CROSS-LANGUAGE APPLICATIONS 1211

PART VI: APPENDICES

APPENDIX A: C++ INTERVIEWS 1239

APPENDIX B: ANNOTATED BIBLIOGRAPHY 1265

APPENDIX C: STANDARD LIBRARY HEADER FILES 1277

APPENDIX D: INTRODUCTION TO UML 1287

INDEX 1293

INTRODUCTION


The development of C++ started in 1982 by Bjarne Stroustrup, a Danish computer scientist, as the successor of C with Classes. In 1985, the first edition of The C++ Programming Language book was released. The first standardized version of C++ was released in 1998, called C++98. In 2003, C++03 came out and contained a few small updates. After that, it was silent for a while, but traction slowly started building up, resulting in a major update of the language in 2011, called C++11. From then on, the C++ Standard Committee has been on a three-year cycle to release updated versions, giving us C++14, C++17, C++20, and now C++23. All in all, with the release of C++23 in 2023, C++ is almost 40 years old and still going strong. In most rankings of programming languages in 2023, C++ is in the top four. It is being used on an extremely wide range of hardware, going from small devices with embedded microprocessors all the way up to multi-rack supercomputers. Besides wide hardware support, C++ can be used to tackle almost any programming job, be it games on mobile platforms, performance-critical artificial intelligence (AI) and machine learning (ML) software, components for self-driving cars, real-time 3-D graphics engines, low-level hardware drivers, entire operating systems, software stacks for networking equipment, web browsers, and so on. The performance of C++ programs is hard to match with any other programming language, and as such, it is the de facto language for writing fast, powerful, and enterprise-class programs. Big tech companies, such as Microsoft, Facebook, Amazon, Google, and many more, use services written in C++ to run their infrastructure. As popular as C++ has become, the language can be difficult to grasp in full. There are simple, but powerful, techniques that professional C++ programmers use that don't show up in traditional texts, and there are useful parts of C++ that remain a mystery even to experienced C++ programmers.

Too often, programming books focus on the syntax of the language instead of its real-world use. The typical C++ text introduces a major part of the language in each chapter, explaining the syntax and providing an example. Professional C++ does not follow this pattern. Instead of giving you just the nuts and bolts of the language with little practical context, this book will teach you how to use C++ in the real world. It will show you the little-known features that will make your life easier, as well as the programming techniques that separate novices from professional programmers.

WHO THIS BOOK IS FOR


Even if you have used the language for years, you might still be unfamiliar with the more advanced features of C++, or you might not be using the full capabilities of the language. Maybe you don't yet know all the new features introduced with the latest release, C++23. Perhaps you write competent C++ code but would like to learn more about design and good programming style in C++. Or maybe you're relatively new to C++ but want to learn the “right” way to program from the start. This book will meet those needs and bring your C++ skills to the professional level.

Because this book focuses on advancing from basic or intermediate knowledge of C++ to becoming a professional C++ programmer, it assumes that you have some knowledge about programming. Chapter 1, “A Crash Course in C++ and the Standard Library,” covers the basics of C++ as a refresher, but it is not a substitute for actual training in programming. If you are just starting with C++ but you have experience in another programming language such as C, Java, or C#, you should be able to pick up most of what you need from Chapter 1.

In any case, you should have a solid foundation in programming fundamentals. You should know about loops, functions, and variables. You should know how to structure a program, and you should be familiar with fundamental techniques such as recursion. You should have some knowledge of common data structures such as queues, and useful algorithms such as sorting and searching. You don't need to know about object-oriented programming just yet—that is covered in Chapter 5, “Designing with Classes.”

You will also need to be familiar with the compiler you will be using to compile your code. Two compilers, Microsoft Visual C++ and GCC, are introduced later in this introduction. For other compilers, refer to the documentation that came with your compiler.

WHAT THIS BOOK COVERS


Professional C++ uses an approach to C++ programming that will both increase the quality of your code and improve your programming efficiency. You will find discussions on new C++23 features throughout this sixth edition. These features are not just isolated to a few chapters or sections; instead, examples have been updated to use new features when appropriate.

Professional C++ teaches you more than just the syntax and language features of C++. It also emphasizes programming methodologies, reusable design patterns, and good programming style. The Professional C++ methodology incorporates the entire software development process, from designing and writing code to debugging and working in groups. This approach will enable you to master the C++ language and its idiosyncrasies, as well as take advantage of its powerful capabilities for large-scale software development.

Imagine users who have learned all of the syntax of C++ without seeing a single example of its use. They know just enough to be dangerous! Without examples, they might assume that all code should go in the main() function of the program or that all variables should be global—practices that are generally not considered hallmarks of good programming.

Professional C++ programmers understand the correct way to use the language, in addition to the syntax. They recognize the importance of good design, the theories of object-oriented programming, and the best ways to use existing libraries. They have also developed an arsenal of useful code and reusable ideas.

By reading and understanding this book, you will become a professional C++ programmer. You will expand your knowledge of C++ to cover lesser known and often misunderstood language features. You will gain an appreciation for object-oriented design and acquire top-notch debugging skills. Perhaps most important, you will finish this book armed with a wealth of reusable ideas that you can actually apply to your daily work.

There are many good reasons to make the effort to be a professional C++ programmer as opposed to a programmer who knows C++. Understanding the true workings of the language will improve the quality of your code. Learning about different programming methodologies and processes will help you to work better with your team. Discovering reusable libraries and common design patterns will improve your daily efficiency and help you stop reinventing the wheel. All of these lessons will make you a better programmer and a more valuable employee. While this book can't guarantee you a promotion, it certainly won't hurt.

HOW THIS BOOK IS STRUCTURED


This book is made up of five parts.

Part I, “Introduction to Professional C++,” begins with a crash course in C++ basics to ensure a foundation of C++ knowledge. Following the crash course, Part I goes deeper into working with strings, because strings are used extensively in most examples throughout the book. The last chapter of Part I explores how to write readable C++ code.

Part II, “Professional C++ Software Design,” discusses C++ design methodologies. You will read about the importance of design, the object-oriented methodology, and the importance of code reuse.

Part III, “C++ Coding the Professional Way,” provides a technical tour of C++ from the professional point of view. You will read about the best ways to manage memory in C++, how to create reusable classes, and how to leverage important language features such as inheritance. You will also learn techniques for input and output, error handling, string localization, how to work with regular expressions, and how to structure your code in reusable components called modules. You will read about how to implement operator overloading, how to write templates, how to put restrictions on template parameters using concepts, and how to unlock the power of lambda expressions and function objects. This part also explains the C++ Standard Library, including containers, iterators, ranges, and algorithms. You will also read about some additional libraries that are available in the standard, such as the libraries to work with time, dates, time zones, random numbers, and the filesystem.

Part IV, “Mastering Advanced Features of C++,” demonstrates how you can get the most out of C++. This part of the book exposes the mysteries of C++ and describes how to use some of its more advanced features. You will read about how to customize and extend the C++ Standard Library to your needs, advanced details on template programming, including template metaprogramming, and how to use multithreading to take advantage of multiprocessor and multicore systems.

Part V, “C++ Software Engineering,” focuses on writing enterprise-quality software. You'll read about the engineering practices being used by programming organizations today; how to write efficient C++ code; software testing concepts, such as unit testing and regression testing; techniques used to debug C++ programs; how to incorporate design techniques,...

Erscheint lt. Verlag 8.1.2023
Reihe/Serie Tech Today
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge C / C++
Schlagworte C++ • Computer Science • Informatik • Programmierung / C u. C++ • Programmierung u. Software-Entwicklung • Programming & Software Development • Programming / C & C++
ISBN-10 1-394-19318-1 / 1394193181
ISBN-13 978-1-394-19318-9 / 9781394193189
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Adobe DRM)
Größe: 8,5 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Das umfassende Handbuch

von Torsten T. Will

eBook Download (2024)
Rheinwerk Computing (Verlag)
CHF 48,75
C++ lernen - professionell anwenden - Lösungen nutzen

von Ulrich Breymann

eBook Download (2023)
Carl Hanser Fachbuchverlag
CHF 48,80
C++ lernen - professionell anwenden - Lösungen nutzen

von Ulrich Breymann

eBook Download (2023)
Carl Hanser Fachbuchverlag
CHF 48,80