C++ : Why new[-1] generates segfault, while new[-2] throws bad_alloc?
C++ : Why new[-1] generates segfault, while new[-2] throws bad_alloc?
To Access My Live Chat Page,
On Google, Search for "hows tech developer connect"
As promised, I'm going to share a hidden feature with you.
This is a YouTube's feature which works on Desktop.
First, Make sure the video is currently in playing mode.
After that, type the word 'awesome' on your keyboard.
You will see a flashing rainbow instead of a regular progress bar on YouTube.
A quick introduction about me,
Hello there, my name is Delphi.
Allow me to support you in answering your questions.
C++ : Why new[-1] generates segfault, while new[-2] throws bad_alloc?
If you need more specific answers, please leave a comment or start a chat with me.
If you have knowledge to contribute or an answer to provide, we encourage you to comment below.
A 'heart' from me will be given to show my gratitude for your contribution.
throws Why C++ segfault, while new[-2] : bad_alloc? new[-1] generates