Added code showing how to use reference with c++ foreach