👌 If you find this video useful and would like to support me (thank you! ❤️):
➡️ https://cafecito.app/programaciondesde0
or ➡️ https://www.paypal.me/ProgramacionDesde0
What pointers are and how they work in C++. Step by step code examples and visualization of memory.
0:45 Definition of "pointer", pointer variable type.
1:50 How to declare a pointer.
5:11 Memory address of a pointer and pointed data.
7:00 Dereference.
11:46 Memory segments. Stack and heap. Function call stack. Memory fragmentation.
18:37 "new" operator to allocate heap memory. Size of a pointer.
22:09 Memory leaks. Garbage collection.
28:14 Difference between pointers and references. C++ references.
31:06 Passing parameters by reference and by value.
32:18 Pointer arithmetic.
33:30 Pointer to pointer.
34:36 "delete" operator to free heap memory. Dangling pointers.
40:48 nullptr (null pointer).
🟩 Tools used:
- Visual Studio Code, with ms-vscode.cpptools extension, MinGW64 compiler and GDB debugger.
- C++ Tutor (http://pythontutor.com/cpp.html)
🟩 Code examples:
🔹 3:31 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej1.cpp
🔹 8:32 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej2.cpp
🔹 9:50 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej3.cpp
🔹 20:51 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej4.cpp
🔹 24:53 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej5.cpp
🔹 27:35 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej6.cpp
🔹 37:08 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej7.cpp
🔹 38:24 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej8.cpp
🔹 39:47 https://github.com/programacion-desde-cero/Ejemplos/blob/master/punteros-ej9.cpp