I've searched for this but didn't find a similar topic.
If I have an object class, for example class Object { ... };
, and I have this pointer for it: Object* p = new Object();
I was wondering what is the correct way to delete this pointer, is it this:
delete (Object*) p;
Or this:
delete[] p;
I can't tell which one is the correct, I would be happy if someone could tell me what's right. Thank you <3