you call delete [] operation for memory that was allocated by "new" operation, which is illegal