Hi 1st time poster

Been working through Accelerated C++ and progressing quite well until now!
Can anyone point me towards an answer to this exercise?

Thanks,
Simon