Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
3いいね 150 views回再生

Undefined Behavior, Dangling Pointers (Part 5) #shorts #programming #cplusplus #pointer #indirection

Hello devs, working with pointers can be a little tricky because we have to deal with memory management. If we are pointing to a memory address and then the variable that it refers to gets deallocated (such as a stack variable going out of scope), then our pointer is known as a dangling pointer. It is essentially pointing to something that no longer exists. Dereferencing this pointer will result in UB (undefined behavior) and can significantly ruin the program. Today we see this in action.

This is part 5 of working with memory addresses and pointers. I strongly recommend watching the next parts to learn more about pointers in C++

Thank you for watching and please like, share, and subscribe for more programming content :)

コメント