Use exceptions and more intelligible variables.
Use pointer instead of iterator.