Safe way to provoke access violation

Viewed 95

Is there a safe way to create a pointer in C++ apart from nullptr that causes an access violation every time it is accessed?

One of my unsuccessful attempts is adding 1 to nullptr.

In my special case I need a solution for Visual Studio 2019.

0 Answers
Related