Details
Title | The C++ workshop: a new, interactive approach to learning C++ |
---|---|
Creators | Green Dale |
Other creators | Guntheroth Kurt ; Mitchell Shaun Ross |
Collection | Электронные книги зарубежных издательств ; Общая коллекция |
Subjects | C++ (Computer program language) ; Application software — Development. ; EBSCO eBooks |
Document type | Other |
File type | |
Language | English |
Rights | Доступ по паролю из сети Интернет (чтение, печать, копирование) |
Record key | on1176246171 |
Record create date | 7/20/2020 |
Allowed Actions
pdf/2371855.pdf | – |
Action 'Read' will be available if you login or access site from another network
Action 'Download' will be available if you login or access site from another network
|
---|---|---|
epub/2371855.epub | – |
Action 'Download' will be available if you login or access site from another network
|
Group | Anonymous |
---|---|
Network | Internet |
Cut through the noise and get real results with a step-by-step approach to learning C++ development.
Network | User group | Action |
---|---|---|
ILC SPbPU Local Network | All |
|
Internet | Authorized users SPbPU |
|
Internet | Anonymous |
|
- Cover
- FM
- Copyright
- Table of Contents
- Preface
- Chapter 1: Your First C++ Application
- Introduction
- Advantages of C++
- Anatomy of a C++ Application
- Exercise 1: Compiling Our First Application
- C++ Build Pipeline
- C++ Keywords
- Keyword Examples
- Preprocessor Directives
- Include
- Macros
- Conditional Compilation
- Exercise 2: Defining Values with Preprocessor Directives
- Basic I/O Statements
- Exercise 3: Reading User Details
- Functions
- Passing by Value, Passing by Reference
- Why Are We Outputting 10?
- Function Overloading
- Default Parameters
- Exercise 4: Functions
- Activity 1: Writing Your Own C++ Application
- Passing by Value, Passing by Reference
- Summary
- Introduction
- Chapter 2: Control Flow
- Introduction
- if/else
- Exercise 5: Implementing if/else Statements
- Ternary Operator
- Exercise 6: Creating a Simple Menu Program Using an if/else Statement
- switch/case
- Exercise 7: Refactor an if/else Chain into switch/case
- Loops
- while
- Exercise 8: Implementing a while Loop
- do while
- Exercise 9: Implementing while and do while Loops with a False Condition
- for
- Exercise 10: Implementing a for Loop
- Range-based for loop
- Exercise 11: Generating Random Numbers Using Loops
- break/continue
- break
- continue
- Exercise 12: Making a Loop More Efficient Using break and continue
- Activity 2: Creating a Number-Guessing Game Using Loops and Conditional Statements
- Summary
- Chapter 3: Built-In Data Types
- Introduction
- Data Types
- Type Modifiers
- Built-In Types
- Reference Table
- Exercise 13: Declaring Data Types
- Containers
- Arrays
- Initialization
- Accessing Elements
- Array Memory
- Exercise 14: Implementing Containers to Store Usernames
- Multidimensional Arrays
- Exercise 15: Using Multidimensional Arrays to Store More Data
- Vectors
- Accessing Elements
- Exercise 16: Looping over a Vector
- Initialization
- Modifying Elements
- Exercise 17: Modifying a Vector
- Classes/Structs
- Classes
- Structs
- Access Modifiers
- Exercise 18: Using Accessibility Modifiers to Control Access
- Constructors/Destructors
- Exercise 19: Classes/Struct
- Storage Lifetime
- Exercise 20: Storage Lifetime Example
- Static
- Activity 3: Sign-Up Application
- Summary
- Chapter 4: Operators
- Introduction
- Arithmetic Operators
- Exercise 21: The Prime Number Checker
- Relational Operators
- Equality
- Comparison
- Exercise 22: The Time-of-Day Calculator
- Unary Operators
- Exercise 23: A Pre-Increment/Post-Increment Example
- Assignment Operators
- Logical Operators
- Exercise 24: Logical Operators Example
- Operator Overloading
- Exercise 25: Operator Overloading Example
- Bitwise Operators
- Activity 4: Fizz Buzz
- Summary
- Chapter 5: Pointers and References
- Introduction
- Memory Addresses
- Pointers
- Exercise 26: Pointers
- Exercise 27: Dereferencing nullptr
- Pointers to Arrays
- Exercise 28: Pointers to Arrays
- Pointer Arithmetic
- Exercise 29: Pointer Arithmetic
- Exercise 30: Incrementing Pointers
- Pointers to Pointers
- Exercise 31: Pointers to Pointers
- References
- Exercise 32: References
- Exercise 33: Bad References
- Pointers and References as Function Arguments
- Exercise 34: Pointers as Function Arguments
- Pointers to Classes or Structs
- Exercise 35: Pointers to Class Instance
- References as Function Arguments
- Exercise 36: References as Function Arguments
- Activity 5: Using Pointers and References to Manipulate an Array of Strings
- Summary
- Chapter 6: Dynamic Variables
- Introduction
- Dynamic Variables
- Exercise 37: Creating and Deleting Dynamic Variables of Basic Types
- Exercise 38: Creating and Deleting Dynamic Class Instances
- Dynamic Arrays
- Exercise 39: Creating and Deleting Dynamic Arrays of Basic Types
- Exercise 40: Creating and Deleting Dynamic Arrays of Classes
- Seven Dynamic Variable Sins
- Exercise 41: Using a Dynamic Variable before Creating It
- Exercise 42: Using a Dynamic Variable after Deleting It
- Exercise 43: Not Deleting a Dynamic Variable
- Exercise 44: Overwriting a Pointer to a Dynamic Variable
- Exercise 45: Deleting a Dynamic Variable Twice
- Exercise 46: Deleting a Dynamic Array with delete instead of delete[]
- Exercise 47: Deleting a Dynamic Variable with delete[] instead of delete
- Dynamic Containers
- Linked Lists
- Binary Search Trees
- Recursive Data Structures
- Visiting Items in a Recursive Data Structure
- Finding Items
- Adding Items
- Deleting Dynamic Items
- Exercise 48: Creating Linked Lists of Class Instances
- Activity 6: Creating Binary Search Trees of Class Instances
- Summary
- Chapter 7: Ownership and Lifetime of Dynamic Variables
- Introduction
- The Lifetime of Dynamic Variables
- Ownership of Dynamic Variables
- Resource Acquisition Is Initialization (RAII)
- Exercise 49: Lifetime Demonstration
- Exercise 50: Owned Pointers in Data Structures
- Exercise 51: Transfer of Ownership
- Smart Pointers — Automated Ownership of Dynamic Variables
- unique_ptr<>
- Exercise 52: Working with unique_ptr<>
- make_unique()
- Exercise 53: Using make_unique()
- unique_ptr<> as a Class Member Variable
- Exercise 54: Using unique_ptr<> as a Class Member Variable
- unique_ptr<> in Function Arguments and Return Values
- Exercise 55: Using unique_ptr<> in Function Return Values
- Shared Ownership of Dynamic Variables
- Exercise 56: Using shared_ptr<>
- make_shared()
- Exercise 57: Using make_shared()
- Activity 7: Storing the Words of a Book Using Dynamic Variables
- Summary
- Introduction
- Chapter 8: Classes and Structs
- Introduction
- Classes versus Structs
- Unions
- Constructors and Destructors
- Constructors
- Default Constructors
- Exercise 58: Defining a Default Constructor
- Parameterized Constructors
- Exercise 59: Defining a Parameterized Constructor
- Copy Constructors
- Shallow Copy or Deep Copy
- Exercise 60: Defining a Copy Constructor
- Copy Assignment Operator
- Exercise 61: Overloading the Assignment Operator
- Destructors
- Activity 8: Creating a VideoClip Class
- Summary
- Chapter 9: Object-Oriented Principles
- Introduction
- Classes and OOP
- S in SOLID
- Exercise 62: Creating a Class that Prints Values
- Encapsulation
- Exercise 63: Creating a Position Class with Private Member Variables
- Getters and Setters
- Exercise 64: Getters and Setters in a Position Class
- Return Value or Reference
- Return by Value
- Return by Reference
- const
- Returning const References
- Const Functions
- Abstraction
- Activity 9: A Basic RPG Combat System
- Summary
- Chapter 10: Advanced Object-Oriented Principles
- Introduction
- Inheritance
- Exercise 65: Inheritance
- Multiple Inheritance
- Exercise 66: Multiple Inheritance
- Access Modifiers and Inheritance
- Exercise 67: Access Modifiers and Inheritance
- Virtual Functions
- Pure Virtual Functions/Abstract Classes
- Exercise 68: Virtual Functions
- Polymorphism
- Exercise 69: Polymorphism
- Casting between Types
- Static Cast
- Dynamic Cast
- C-Style Cast
- Exercise 70: Casting
- Activity 10: An Encyclopedia Application
- Summary
- Chapter 11: Templates
- Introduction
- Syntax
- Template Classes
- Exercise 71: Creating Different Types for the Position Objects
- Multiple Template Parameters
- Template Functions
- Exercise 72: Comparing Position Values Using a Template Function
- Template Specialization
- Additional Template Considerations
- Forcing Accepted Types
- Templates and Default Constructors
- Creating a Generic Queue
- What Is a Queue?
- Implementing Constructors and Destructors in the Queue
- Dynamic Memory
- Allocators
- Resizing and Appending
- Pushing and Popping
- Finalizing and Testing
- Activity 11: Creating a Generic Stack
- Summary
- Chapter 12: Containers and Iterators
- Introduction
- Containers
- A String Is a Container
- String Constructors
- Exercise 73: Creating Strings
- Assigning to Strings
- Operations on Strings
- Iterators
- Further Research
- Exercise 74: Is It a Palindrome?
- Vectors-Handy, Resizable Arrays
- Vector Constructors
- Vector Assignment
- Exercise 75: Accessing Elements in a Vector
- Operations on Vectors
- Searching Vectors
- Exercise 76: Sorting Vectors with a Custom Comparison
- Map/Unordered Map: Our Associative Containers
- Constructing Maps and Unordered Maps
- Operations on Maps and Unordered Maps
- Exercise 77: Map Quiz
- Sets/Multisets
- Constructors
- Exercise 78: A Custom Comparator for a Set
- Operations
- Exercise 79: Using a Set to Get the Number of Unique Elements in a Multiset
- Queues/Stacks
- Constructors
- Operations
- Activity 12: Converting RPG Combat to Use Standard Library Containers
- Summary
- Chapter 13: Exception Handling in C++
- Introduction
- Responding to Unexpected Events
- Throwing Exceptions
- Uncaught Exceptions
- Exercise 80: Throwing Uncaught Exceptions
- Catching Exceptions
- Exercise 81: try/catch Blocks
- Exercise 82: Exceptions Thrown by C++
- Unwinding the Stack
- RAII (Resource Acquisition Is Initialization) and Exception Handling
- Exercise 83: Unwinding the Stack
- Activity 13: Handling Exceptions
- Summary
- Appendix
- Index