While experimenting with C++ and the `reinterpret_cast` function I tried to convert a `short` to a `string` and got a STATUS\_ACCESS\_VIOLATION Exception.

```
   short s = 32767;

   short* s2 = &s;
   string* test4 = reinterpret_cast<string*>(s2);

   cout << "reinterpret_cast: " << *test4 << endl;

```

In my understanding, a there was a try to use a piece of memory, which is not allocated to my application's process.

How can I look out for such tryings of forbidden memory accesses? How can I reinterpret only this piece, which contains my short value?