C Bookcamp 1 / converted 1st Edition by Frances Buontempo – Ebook PDF Instant Download/Delivery: 978-1633438330, 1633438333
Full download C Bookcamp 1 / converted 1st Edition after payment

Product details:
ISBN 10: 1633438333
ISBN 13: 978-1633438330
Author: Frances Buontempo
Build your skills with essential modern C++ features hands-on by completing eight interesting coding projects.
In Learn C++ by Example you’ll:
- Learn how to write modern C++ using new features from C++ 11 to 23
- Think about testing as you code
- Learn what happens “under the hood” of your C++ code
- Choose the most efficient algorithm or data structure
About the technology
C++ is used for everything from financial modeling to video games. C++ 11, 17, and 20 have all introduced exciting features that can increase your coding efficiency. This book introduces these features by putting them to use in real projects. Along the way, you’ll get up to speed with frequently used data structures, algorithms, and various parts of the standard library.
Table of contents:
1 Hello again, C++!
1.1 Why does C++ matter?
1.2 When should you use C++?
1.3 Why read this book?
1.4 How does this book teach C++?
Who this book is for
Hello, again, C++!
What you’ll learn from reading this book
1.5 Some pro tips
2 Containers, iterators, and ranges
2.1 Creating and displaying a vector
2.2 Creating and displaying Pascal’s triangle
A reminder of Pascal’s triangle
Coding Pascal’s triangle
Move semantics and perfect forwarding
Using ranges to display the vector
Using format to display output
2.3 Properties of the triangle
Checking the first and last elements of each row
Checking the number of elements in each row
Checking the sum of the elements in a row
How many rows can we generate correctly?
Checking whether each row is symmetric
Highlighting odd numbers in a row
3 Input of strings and numbers
3.1 Guessing a predetermined number
Accepting user input the hard way
Accepting optional numeric input
Validation and feedback using std::function and lambdas
3.2 Guessing a random number
Setting up a random number generator
Using the random number generator
3.3 Guessing a prime number
Checking whether the number is prime
Checking properties with static_assert
Generating a random prime number
Deciding which digits are correct
Providing different clues using std::function
4 Time points, duration, and literals
4.1 How long until the last day of the year?
4.2 Understanding durations in detail
Ratios
Durations
Literal suffixes and operator/for readable code
Requirements and concepts
How many days until the last day of the year?
Using last to find how long to payday
Writing testable code
4.3 Input, output, and formatting
Parsing a date
Formatting time points and durations
4.4 Time zones
5 Creating and using objects and arrays
5.1 Creating a deck of playing cards
Defining a card type using a scoped enum for the suit
Defining a card type using a strong type for the face value
Constructors and default values
Displaying playing cards
Using an array to make a deck of cards
Using generate to fill the array
Comparison operators and defaults
5.2 Higher-or-lower card game
Shuffling the deck
Building the game
Using std::variant to support cards or jokers
Building the game with an extended deck of cards
6 Smart pointers and polymorphism
6.1 A class hierarchy
An abstract base class
A concrete class
Warming up for a race
Using type traits to check for special member functions
6.2 Writing and using derived classes in a vector
A blob moving randomly
Smart pointers
Race!
Some design considerations
7 Associative containers and files
7.1 Hardcoded answer smash
Creating and using an std::map
Pairs, tuples, and structured bindings
A simple answer smash game
7.2 Associative containers
The map type in more detail
Using lower and upper bound to find a key more efficiently
Multimaps
7.3 File-based answer smash
Loading data from a file
Picking a word randomly using std::sample
Answer smash
8 Unordered maps and coroutines
8.1 Randomly generated matching pennies
8.2 Matching pennies using an unordered_map
Unordered containers and std::hash
Using an unordered_map to make a prediction
The mind reader game
8.3 Coroutines
How to make a coroutine
A coroutine function
The coroutine’s return object
RAll and the rule of zero
Filling in the promise_type
Filling in the Task type
A coroutine mind reader
9 Parameter packs and std::visit
9.1 The triangle numbers
Testing our triangle numbers with algorithms
Execution policies for algorithms
Mutable lambdas
More properties of the triangle numbers
9.2 A simple slot machine
Revision of constexpr and std::format
Using std::rotate to spin the reels
The simple slot machine
9.3 A better slot machine
Parameter packs and fold expressions
Using a parameter pack to find frequencies
A fairer payout
Allowing holds, nudges, or spins
Spinning reels with std::visit and std::views::zip
People also search for:
c boot camp
c programming bootcamps
c coding bootcamp
ac.1 boot
a/c boot
Tags: Frances Buontempo, C Bookcamp 1


