Originally Posted by
shrink_tubing
Your 17000+ posts suggests to me you know a thing or two about programing.
Prolixity is an indication of free time, not knowledge. Especially when about half of those come from circular debates from ever changing positions about whether scrambled eggs are better for you than poached eggs or something equally as pointless. That said:
I'd be interested to know why the code has undefined behaviour
Code:
char* ptr = new char[12]; // here be square brackets
delete ptr; // here be no square brackets
Do yourself a favour and heed this:
You don't need to use new here.