Hello, I had a question about what the difference is between delete and delete[]. Lets say for example I have this code:
Whats the difference between that, and this:Code:char *tmp;
tmp = new char[100];
// ....
delete char;
Will they both free up the memory allocated to tmp? They both seem to compile and run without errors, just wondering if I'm causing a memory leak somewhere.Code:char *tmp;
tmp = new char[100];
// ....
delete []char;