C/C++ Pointers and Applications

C/C++ Pointers and Applications

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 6h 52m | 2.04 GB

Explore the use of pointers in dynamic arrays, linked lists, function pointers, and callbacks

C and C++ are robust languages in terms of performance and flexibility, but they include some complex features that take time to master, such as pointers. Pointers separate C and C++ from other languages and are incredibly powerful as they allow programs to access memory directly and manipulate it.

This course takes you through pointers and their applications, focusing on their implementation in C++ rather than in C. You’ll learn the basics of pointers and then progress to understanding and implementing static and dynamic arrays, pointers to arrays, and heap-based arrays. You’ll also get to grips with advanced memory management by creating a custom dynamic array (just like std:: vector in the standard C++ library). You’ll use placement new and placement delete to directly place objects in a memory pool allocated using the operator new function, and understand that this is a powerful mechanism to optimize the use of heap memory with user-defined objects.

By the end of this course, you’ll have developed a solid understanding of pointers and how they can be implemented in C/C++.

Learn

  • Gain an in-depth understanding of how pointers work
  • Understand how basic data structures can be implemented efficiently
  • Get to grips with the applications of pointers
  • Discover how the callback mechanism works through pointers and objects
Table of Contents

Introduction
1 Introduction
2 Quick Intro to Modern C++ (C++11 14)
3 Introduction to Pointers
4 Examples of Pointers

Static Arrays
5 Array Basics
6 Examples of Static Arrays
7 Array as Function Argument
8 Array as Reference Argument
9 Introduction to std – -array<T>
10 Heap-based Arrays
11 Multidimensional Arrays
12 Multidimensional Arrays on Heap

Dynamic Arrays
13 Introduction
14 Constructors
15 Accessors
16 Modifiers
17 Element Erasure
18 Copy Move Semantics – Part I
19 Copy Move Semantics – Part II
20 Copy Move Semantics – Part III
21 Copy Move Semantics – Part IV
22 Copy Move Semantics Implementation
23 Dynamic Array Issues
24 Placement new & delete
25 Smart Reallocation
26 New Dynamic Array I – Constructors
27 New Dynamic Array II – Add Function
28 New Dynamic Array III – Insert Function
29 New Dynamic Array IV – Miscellaneous Functions
30 Arrays – Conclusion

Singly Linked Lists
31 Linked Lists Introduction
32 Basic Functions
33 Modifiers – AddFront & AddBack
34 Constructors
35 Copy Move Semantics
36 Modifiers – Insertion
37 Modifiers – Erase
38 Issues
39 Element Access

Doubly Linked Lists
40 Basic Functions I
41 Basic Functions II
42 Modifiers – Add
43 Accessors
44 Constructors
45 Modifiers – Front & End Removal
46 Modifiers – Insertion
47 Modifiers – Erase

Strings
48 Basics
49 String Length
50 Copy & Join
51 Copy through Allocation
52 String Class

Function Pointers
53 Basics I
54 Basics II
55 Function Pointers As Arguments
56 Function Pointers As Return Values – I
57 Function Pointers As Return Values – II
58 Arrays Of Function Pointers – I
59 Arrays Of Function Pointers – II

Pointer to Member
60 Basic Syntax
61 Constant Member Functions
62 Simplifying Through Macros
63 Static Members

Callbacks
64 Introduction
65 Function Pointers As Callbacks
66 Function Pointers Example
67 Member Function As Callback
68 Function Objects
69 Function Objects As Callbacks
70 Function Object Internals
71 Function Objects Vs Function Pointers