The book is about Visual C++, but you are using Dev-C++. These are two different IDE's. You should use Visual C++ if possible since that is the IDE that the book was intended for.
If you cannot, then it might be possible to make the code work in Dev-C++ on Windows, but you'll have to make a few (or a lot of) changes. I'm not familiar enough with either the code or the IDE to help further.