Also, you should call this "end" instead of "last", since it's a pointer past the last element.