- 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
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++.
All the codes and supporting files for this course are available at- https://github.com/PacktPublishing/C-C-Pointers-and-Applications
- Implement callbacks using function pointers
- Create pointers to members having a syntax more complex than that used for declaring function pointers
- Learn how function pointers work and how their syntax can be simplified