Course Overview
C & C++ are very powerful languages when it comes to performance & flexibility. But there are some features that are complex and take time to master. One of such features is pointers. Pointers is what separates C/C++ from other languages. These are incredibly powerful as they allow programs to access memory directly and manipulate it.
This course focuses on pointers and their applications.It leans more towards implementation in C++, rather C. You'll learn the basics of pointers and then move on to understanding and implementing arrays, pointers to arrays & heap based arrays. You'll also learn advanced memory management by creating a custom dynamic array (just like std::vector<T> in standard C++ library). You'll use placement new & delete to directly place objects in a memory pool allocated through operator new function. As you'll see later in the course, this is a powerful mechanism to optimize usage of heap memory with user-defined objects.
After arrays, you'll learn how to use pointers to create node-based data structures. We'll focus on two types of linked lists - singly & doubly linked lists. You'll understand the difference between arrays and lists and also learn how to access the elements of both the data structures without having to know their internal structure. This is possible by creating context variables that allows access in a container-agnostic manner.
Pointers are invaluable while working with strings. You'll learn how to create dynamic strings using pointers. This will be shown with an implementation of a string class.
The next important topic you'll learn and implement will be function pointers. You'll understand how function pointers work and how we can simplify their syntax. You'll also master the complexity of creating arrays of function pointers and functions that return function pointers. On top of that, you'll be comfortable with functions returning pointer to functions that themselves return pointer to other functions. Confused? See the section on function pointers.
That's not all. You'll also learn how to create pointer to members (which have even a more complex syntax than function pointers).
Furthermore, you'll learn how to create callbacks through functions pointers. This course will show you how to optimize the callbacks through function objects. Function objects are more powerful than functions pointers as callbacks.We'll use this knowledge and apply it in many examples to reinforce the concept of pointers to functions.
This course also introduces some commonly used containers of the C++ standard template library (STL), such as std::array, std::vector & std::list. By the time you hit these topics, you'll already know how these are implemented internally. How about that!
This course relies on some modern C++ (C++11) features to simplify things, such as auto, std::initializer_lists, type aliases. Even if you don't know about these features, the course has videos on these topics to get you started. Additionally, there are four full length videos dedicated to discussion on move semantics.
I hope you enjoy this course!
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction 6 bài · 20 phút
- Slide Deck Học thử
- Introduction Học thử 1:40
- Source Code Học thử
- Quick Intro to Modern C++ Học thử 7:18
-
Introduction to Pointers 4:47
- Examples of Pointers Học thử 5:57
Chương 2 Static Arrays 9 bài · 44 phút
-
Source Code
- Array Basics Học thử 3:15
- Examples of Static Arrays Học thử 3:27
-
Array as Function Argument 4:26
-
Array as Reference Argument 6:15
-
Introduction to std::array<T> 5:08
-
Heap-based Arrays 6:47
-
Multidimensional Arrays 6:57
-
Multidimensional Arrays on Heap 7:20
Chương 3 Dynamic Arrays 19 bài · 1 giờ 55 phút
-
Source Code
-
Introduction 10:39
-
Constructors 5:31
-
Accessors 5:20
-
Modifiers 6:22
-
Element Erasure 7:10
-
Copy/Move Semantics - Part I 5:04
-
Copy/Move Semantics - Part II 6:19
-
Copy/Move Semantics - Part III 8:03
-
Copy/Move Semantics - Part IV 6:10
-
Copy/Move Semantics Implementation 5:10
-
Dynamic Array Issues 4:59
-
Placement new & delete 5:51
-
Smart Reallocation 3:15
-
New Dynamic Array I - Constructors 7:29
-
New Dynamic Array II - Add Function 5:45
-
New Dynamic Array III - Insert Function 8:55
-
New Dynamic Array IV - Miscellaneous Functions 9:47
-
Arrays - Conclusion 3:19
Chương 4 Singly Linked Lists 10 bài · 49 phút
-
Source Code
-
Linked Lists Introduction 3:19
-
Basic Functions 6:02
-
Modifiers - AddFront & AddBack 7:12
-
Constructors 5:53
-
Copy/Move Semantics 5:04
-
Modifiers - Insertion 5:07
-
Modifiers - Erase 3:56
-
Issues 2:45
-
Element Access 9:51
Chương 5 Doubly Linked Lists 9 bài · 47 phút
-
Source Code
-
Basic Functions I 5:35
-
Basic Functions II 4:32
-
Modifiers - Add 5:58
-
Accessors 5:17
-
Constructors 5:39
-
Modifiers - Front & End Removal 6:32
-
Modifiers - Insertion 7:13
-
Modifiers - Erase 5:54
Chương 6 Strings 6 bài · 35 phút
-
Source Code
-
Basics 7:46
-
String Length 4:04
-
Copy & Join 8:38
-
Copy through Allocation 5:13
-
String Class 9:37
Chương 7 Function Pointers 8 bài · 40 phút
-
Source Code
-
Basics I 6:42
-
Basics II 4:32
-
Function Pointers As Arguments 8:34
-
Function Pointers As Return Values - I 7:23
-
Function Pointers As Return Values - II 4:44
-
Arrays Of Function Pointers - I 3:55
-
Arrays Of Function Pointers - II 4:25
Chương 8 Pointer To Member 5 bài · 16 phút
-
Source Code
-
Basic Syntax 6:47
-
Constant Member Functions 2:50
-
Simplifying Through Macros 3:50
-
Static Members 2:27
Chương 9 Callbacks 10 bài · 47 phút
-
Source Code
-
Introduction 5:41
-
Function Pointers As Callbacks 7:20
-
Function Pointers Example 6:01
-
Member Function As Callback 7:00
-
Function Objects 5:17
-
Function Objects As Callbacks 4:07
-
Function Object Internals 5:37
-
Function Objects Vs Function Pointers 6:04
-
BONUS LECTURE
Requirment
-
Basic knowledge of C & C++
-
Should understand basic syntax of pointers
Outcomes
-
Understand in depth how pointers work
-
Understand the applications of pointers
-
Understand efficient implementation of basic data structures
-
Understand how callback mechanism works through pointers and objects
0 Student
2 Courses
0 review