Add getint function that uses pointers.

Exercise 5-1.