Mô tả

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!

Bạn sẽ học được gì

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

Yêu cầu

  • Basic knowledge of C & C++
  • Should understand basic syntax of pointers

Nội dung khoá học

9 sections

Introduction

5 lectures
Introduction
01:40
Source Code
00:02
Quick Intro to Modern C++
07:18
Introduction to Pointers
04:47
Examples of Pointers
05:57

Static Arrays

9 lectures
Source Code
00:03
Array Basics
03:15
Examples of Static Arrays
03:27
Array as Function Argument
04:26
Array as Reference Argument
06:15
Introduction to std::array<T>
05:08
Heap-based Arrays
06:47
Multidimensional Arrays
06:57
Multidimensional Arrays on Heap
07:20

Dynamic Arrays

19 lectures
Source Code
00:03
Introduction
10:39
Constructors
05:31
Accessors
05:20
Modifiers
06:22
Element Erasure
07:10
Copy/Move Semantics - Part I
05:04
Copy/Move Semantics - Part II
06:19
Copy/Move Semantics - Part III
08:03
Copy/Move Semantics - Part IV
06:10
Copy/Move Semantics Implementation
05:10
Dynamic Array Issues
04:59
Placement new & delete
05:51
Smart Reallocation
03:15
New Dynamic Array I - Constructors
07:29
New Dynamic Array II - Add Function
05:45
New Dynamic Array III - Insert Function
08:55
New Dynamic Array IV - Miscellaneous Functions
09:47
Arrays - Conclusion
03:19

Singly Linked Lists

10 lectures
Source Code
00:02
Linked Lists Introduction
03:19
Basic Functions
06:02
Modifiers - AddFront & AddBack
07:12
Constructors
05:53
Copy/Move Semantics
05:04
Modifiers - Insertion
05:07
Modifiers - Erase
03:56
Issues
02:45
Element Access
09:51

Doubly Linked Lists

9 lectures
Source Code
00:02
Basic Functions I
05:35
Basic Functions II
04:32
Modifiers - Add
05:58
Accessors
05:17
Constructors
05:39
Modifiers - Front & End Removal
06:32
Modifiers - Insertion
07:13
Modifiers - Erase
05:54

Strings

6 lectures
Source Code
00:03
Basics
07:46
String Length
04:04
Copy & Join
08:38
Copy through Allocation
05:13
String Class
09:37

Function Pointers

8 lectures
Source Code
00:03
Basics I
06:42
Basics II
04:32
Function Pointers As Arguments
08:34
Function Pointers As Return Values - I
07:23
Function Pointers As Return Values - II
04:44
Arrays Of Function Pointers - I
03:55
Arrays Of Function Pointers - II
04:25

Pointer To Member

5 lectures
Source Code
00:03
Basic Syntax
06:47
Constant Member Functions
02:50
Simplifying Through Macros
03:50
Static Members
02:27

Callbacks

10 lectures
Source Code
00:02
Introduction
05:41
Function Pointers As Callbacks
07:20
Function Pointers Example
06:01
Member Function As Callback
07:00
Function Objects
05:17
Function Objects As Callbacks
04:07
Function Object Internals
05:37
Function Objects Vs Function Pointers
06:04
BONUS LECTURE
00:01

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.