Question: I am using CreateUserWizard and added additional WizardStep for user additional details.
I am using one dropdownlist. value has been filled from DB in dropdownlist. 
Now, when I will change the value in dropdownlist. I want to chekc/uncheck the one checkbox based on it's value in DB for selected dropdownlist value.
For that i want to call onselectedindexchanged event of dropdownlist.

How to fire onselectedindexchanged event?

Please help me to solve this problem?

Answer: 
There is a lot of stuff wrong with this code, but I will list a few of the big ones. 

1. As smentioned by others, you `new char`'s need to be one bigger than they are.
2. You default constructor should set name to nullptr.
3. you have a memory handling error whenever you do an assignment, eg on this line: `drv = d;` because it calls the default operator=, which is incorrect in your case. Ther eis the Law of the Big Three which loosely states that whenever you need either a (non-trivial) copy constructor, copy assignment operator, or destructor, you'll most likely need to implement the others, too. You need to write an operator=!

Based on existing code, I would expect your operator= to look vaguely like this:

```
//assignment operator
const driver&operator=(const driver &rhs)
{
    if (this==&rhs) return *this;
    delete[] this->name;
    this->name = new char[strlen(rhs.name)+1];
    strcpy(this->name, rhs.name);
    this->age = rhs.age;
    return *this;
}

```

Do all that, and your core dump goes away.

PS Please, please just learn to use std::strings, new-ing char arrays and managing the memory yourself is a bad bad move.
`name = new char[len+1];` not `name = new char[len];`

`name = new char[strlen(d.name) + 1];` not `name = new char[strlen(d.name)];`

`delete[]` not `delete`

Need to define an assignment operator `driver& operator=(const driver &d)` in order to follow the rule of three.

Similar changes need to `automobile`.

However I don't see a memory leak, what makes you think you have one?