|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/cpp-pointers/
课程评论:没有评论
课程名称:C/C++ 指针与应用 课程概述:C 和 C++ 是在性能和灵活性方面非常强大的编程语言,但它们的一些特性较为复杂,需要时间去掌握。其中之一就是指针。指针是 C/C++ 与其他语言的分隔线,它们允许程序直接访问和操作内存。本课程重点关注指针及其应用,主要以 C++ 的实现为主。 课程内容将从指针的基础知识开始,逐步深入到数组、数组指针以及基于堆的数组的理解和实现。学员将学习高级内存管理,创建自定义动态数组(类似于标准 C++ 库中的 std::vector)。课程还将介绍如何使用定位 new 和 delete 在通过 operator new 函数分配的内存池中直接放置对象,这是一种优化堆内存使用的强大机制。 在掌握数组后,学员将学习如何利用指针创建基于节点的数据结构,关注两种类型的链表——单向链表和双向链表。课程将帮助学员理解数组与链表之间的区别,并学习如何以容器无关的方式访问这两种数据结构的元素。 课程还将涉及字符串的操作,学员将学习如何使用指针创建动态字符串,并实现一个字符串类。接下来的重要主题是函数指针,学员将理解函数指针的工作原理,并掌握简化其语法的技巧。同时,课程将深入探讨如何创建函数指针数组以及返回函数指针的函数。 此外,学员还将了解成员指针的创建,学习如何通过函数指针实现回调,并优化这些回调以使用函数对象。通过许多示例,课程将加深对函数指针概念的理解。 课程还介绍了一些 C++ 标准模板库(STL)中常用的容器,如 std::array、std::vector 和 std::list。在学习这些主题时,学员将已了解其内部实现。 本课程依赖于一些现代 C++ (C++11) 特性以简化困难的概念,例如 auto、std::initializer_lists 和类型别名。即使学员对这些特性不熟悉,课程也提供了相关主题的视频以帮助入门。此外,课程还有四个完整的视屏专门讨论移动语义。 希望大家喜欢这门课程!
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 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!