new char[1]
and new char
,essentially the same thing,hm?
You have to delete char[1]
with delete[]
according to the standard, so not quite identical.
The objects created are the same, the (invisible) bookkeeping used is not.
That means that you can use the chars in the same way, but you must delete them with the matching delete operator (delete
versus delete[]
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With