Book description
C++ Recipes: A Problem-Solution Approach is Apress' solution for those C++ programmers looking for a handy code cookbook reference guide. It covers the latest C++ 14 as well as some of the code templates available in the latest Standard Template Library (STL).
In this handy reference, you'll find numbers, strings, dates, times, classes, exceptions, streams, flows, pointers and more. Also, you'll see various code samples, templates for C++ algorithms, parallel processing, multithreading and numerical processes. These have many applications including game development, big data analytics, financial engineering and analysis, enterprise applications and more. A wealth of STL templates on function objects, adapters, allocators, and extensions are also available.
This is a "must have", contemporary reference for your technical books library.
Table of contents
- Cover
- Title
- Copyright
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewers
- Acknowledgments
- Introduction
-
Chapter 1: Beginning C++
- Recipe 1-1. Finding a Text Editor
- Recipe 1-2. Installing Clang on Ubuntu
- Recipe 1-3. Installing Clang on Windows
- Recipe 1-4. Installing Clang on OS X
- Recipe 1-5. Building Your First C++ Program
- Recipe 1-6. Debugging C++ programs using GDB in Cygwin or Linux
- Recipe 1-7. Debugging Your C++ Programs on OS X
- Recipe 1-8. Switching C++ Compilation Modes
- Recipe 1-9. Building with the Boost Library
-
Chapter 2: Modern C++
- Recipe 2-1. Initializing Variables
- Recipe 2-2. Initializing Objects with Initializer Lists
- Recipe 2-3. Using Type Deduction
- Recipe 2-4. Using auto with Functions
- Recipe 2-5. Working with Compile Time Constants
- Recipe 2-6. Working with Lambdas
- Recipe 2-7. Working with Time
- Recipe 2-8. Understanding lvalue and rvalue References
- Recipe 2-9. Using Managed Pointers
- Chapter 3: Working with Text
- Chapter 4: Working with Numbers
- Chapter 5: Classes
-
Chapter 6: Inheritance
- Recipe 6-1. Inheriting from a Class
- Recipe 6-2. Controlling Access to Member Variables and Methods in Derived Classes
- Recipe 6-3. Hiding Methods in Derived Classes
- Recipe 6-4. Using Polymorphic Base Classes
- Recipe 6-5. Preventing Method Overrides
- Recipe 6-6. Creating Interfaces
- Recipe 6-7. Multiple Inheritance
-
Chapter 7: The STL Containers
- Recipe 7-1. Storing a Fixed Number of Objects
- Recipe 7-2. Storing a Growing Number of Objects
- Recipe 7-3. Storing a Set of Elements that Is Constantly Altered
- Recipe 7-4. Storing Sorted Objects in a Container that Enables Fast Lookups
- Recipe 7-5. Storing Unsorted Elements in a Container for Very Fast Lookups
-
Chapter 8: The STL Algorithms
- Recipe 8-1. Using an iterator to Define a Sequence within a Container
- Recipe 8-2. Calling a Function on Every Element in a Container
- Recipe 8-3. Finding the Maximum and Minimum Values in a Container
- Recipe 8-4. Counting Instances of a Value in a Sequence
- Recipe 8-5. Finding Values in a Sequence
- Recipe 8-6. Sorting Elements in a Sequence
- Chapter 9: Templates
-
Chapter 10: Memory
- 10-1. Using Static Memory
- 10-2. Using Stack Memory
- 10-3. Using Heap Memory
- 10-4. Using Automated Shared Memory
- 10-5. Creating Single-Instance Dynamic Objects
- 10-6. Creating Smart Pointers
- 10-7. Debugging Memory Problems by Overloading new and delete
- 10-8. Calculating Performance Impacts of Code Changes
- 10-9. Understanding the Performance Impacts of Memory Choices
- 10-10. Reducing Memory Fragmentation
- Chapter 11: Concurrency
-
Chapter 12: Networking
- 12-1. Setting Up a Berkeley Sockets Application on OS X
- 12-2. Setting Up a Berkeley Sockets Application in Eclipse on Ubuntu
- 12-3. Setting Up a Winsock 2 Application in Visual Studio on Windows
- 12-4. Creating a Socket Connection between Two Programs
- 12-5. Creating a Networking Protocol between Two Programs
- Chapter 13: Scripting
- Chapter 14: 3D Graphics Programming
- Index
Product information
- Title: C++ Recipes: A Problem-Solution Approach
- Author(s):
- Release date: May 2015
- Publisher(s): Apress
- ISBN: 9781484201572
You might also like
book
Modern C++ Programming Cookbook - Second Edition
A pragmatic recipe book for acquiring a comprehensive understanding of the complexities and core fundamentals of …
book
C++ High Performance
Write code that scales across CPU registers, multi-core, and machine clusters About This Book Explore concurrent …
book
C++17 STL Cookbook
Over 90 recipes that leverage the powerful features of the Standard Library in C++17 About This …
book
Advanced C++
Become an expert at C++ by learning all the key C++ concepts and working through interesting …