The program you typed in from the book, did it start with #include "stdafx.h" ? That's a compiled header that most MS C++ Visual Studio programs need. If not, add it to the top of the include list, ( it must be the first one), and see if the program works for you. Your friend was probably using a different compiler, which doesn't use it.
It seems to me, that, that is an older book. The fourth edition, from 2011, shows just #include < iostream> Most of the newer includes don't need the .h, so try removing them in the source file. #include < Iostream.h> becomes #include < iostream> and so on.