Advanced C++: Write Robust C++ Code So Fast They Will Think You Cheated
Book information
Description
Become an expert at C++ by learning all the key C++ concepts and working through interesting exercises Key Features Explore C++ concepts through descriptive graphics and interactive exercises Learn how to keep your development bug-free with testing and debugging Discover various techniques to optimize your code Book Description C++ is one of the most widely used programming languages and is applied in a variety of domains, right from gaming to graphical user interface (GUI) programming and even operating systems. If you're looking to expand your career opportunities, mastering the advanced features of C++ is key. The book begins with advanced C++ concepts by helping you decipher the sophisticated C++ type system and understand how various stages of compilation convert source code to object code. You'll then learn how to recognize the tools that need to be used in order to control the flow of execution, capture data, and pass data around. By creating small models, you'll even discover how to use advanced lambdas and captures and express common API design patterns in C++. As you cover later chapters, you'll explore ways to optimize your code by learning about memory alignment, cache access, and the time a program takes to run. The concluding chapter will help you to maximize performance by understanding modern CPU branch prediction and how to make your code cache-friendly. By the end of this book, you'll have developed programming skills that will set you apart from other C++ programmers. What you will learn Delve into the anatomy and workflow of C++ Study the pros and cons of different approaches to coding in C++ Test, run, and debug your programs Link object files as a dynamic library Use templates, SFINAE, constexpr if expressions and variadic templates Apply best practice to resource management Who this book is for If you have worked in C++ but want to learn how to make the most of this language, especially for large projects, this book is for you. A general understanding of programming and knowledge of using an editor to produce code files in project directories is a must. Some experience with strongly typed languages, such as C and C++, is also recommended. Cover FM Copyright Table of Contents Preface Chapter 1: Anatomy of Portable C++ Software Introduction Managing C++ Projects The Code-Build-Test-Run Loop Building a CMake Project Exercise 1: Using CMake to Generate Ninja Build Files Importing a CMake Project into Eclipse CDT Exercise 2: Importing the CMake File into Eclipse CDT Exercise 3: Adding New Source Files to CMake and Eclipse CDT Activity 1: Adding a New Source-Header File Pair to the Project Unit Testing Preparing for the Unit Tests Exercise 4: Preparing Our Project for Unit Testing Building, Running, and Writing Unit Tests Exercise 5: Building and Running Tests Exercise 6: Testing the Functionality of Code Activity 2: Adding a New Class and Its Test Understanding Compilation, Linking, and Object File Contents Compilation and Linking Steps Exercise 7: Identifying Build Steps The Linking Step Diving Deeper: Viewing Object Files Exercise 8: Exploring Compiled Code Debugging C++ Code Exercise 9: Debugging with Eclipse CDT Writing Readable Code Indentation and Formatting Use Meaningful Names as Identifiers Keeping Algorithms Clear and Simple Exercise 10: Making Code Readable Activity 3: Making Code More Readable Summary Chapter 2A: No Ducks Allowed – Types and Deduction Introduction C++ Types C++ Fundamental Types C++ Literals Specifying Types – Variables Exercise 1: Declaring Variables and Exploring Sizes Specifying Types – Functions Exercise 2: Declaring Functions Pointer Types Exercise 3: Declaring and Using Pointers Creating User Types Enumerations Exercise 4: Enumerations – Old and New School Structures and Classes Fraction Class Constructors, Initialization, and Destructors Class Special Member Functions Implicit Versus Explicit Constructors Class Special Member Functions – Compiler Generation Rules Defaulting and Deleting Special Member Functions Rule of Three/Five and Rule of Zero Constructors – Initializing the Object Exercise 5: Declaring and Initializing Fractions Values Versus References and Const Exercise 6: Declaring and Using Reference Types Implementing Standard Operators Implementing the Output Stream Operator (
Similar books
Advanced C++: Write Robust C++ Code So Fast They Will Think You Cheated. Code
2019 · ZIP
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF
Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.
2022 · PDF
The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians
1809 · PDF