Is being able to access data from beyond the grave expected?
This is technically known as Undefined Behavior. Don’t be surprised if it offers you a can of beer either.
More Related Contents:
- What are the differences between a pointer variable and a reference variable in C++?
- When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used?
- What is a smart pointer and when should I use one?
- How do I use arrays in C++?
- What is the difference between const int*, const int * const, and int const *?
- How to pass objects to functions in C++?
- What are all the common undefined behaviours that a C++ programmer should know about? [closed]
- Is segmentation fault actual undefined behavior when we refer to a non-static data-member
- Pointer to class data member “::*”
- Why should I use a pointer rather than the object itself?
- Which kind of pointer do I use when?
- Is it safe to delete a NULL pointer?
- Why does the use of ‘new’ cause memory leaks?
- How should I write ISO C++ Standard conformant custom new and delete operators?
- What is the point of function pointers?
- May I treat a 2D array as a contiguous 1D array?
- Undefined behavior and sequence points reloaded
- Why dereferencing a null pointer is undefined behaviour?
- How does delete[] know it’s an array?
- Why is ‘this’ a pointer and not a reference?
- What are the differences between a pointer variable and a reference variable?
- May I take the address of the one-past-the-end element of an array? [duplicate]
- Why would one replace default new and delete operators?
- Is the pointer guaranteed to preserve its value after `delete` in C++?
- Deleting a pointer in C++
- What’s the meaning of * and & when applied to variable names?
- Is pointer comparison undefined or unspecified behavior in C++?
- Are pointer variables just integers with some operators or are they “symbolic”?
- Conversion from Derived** to Base**
- What does ‘dereferencing’ a pointer mean in C/C++?