I would say its best to use whatever compiler that the book uses, unless you have to go out and by one. If it asks you to buy one, its up to you wether you buy one or not. If not you can use the free Dev-C++ (
www.bloodshed.com) for Windows, or g++ for Linux. Both are very good in my experience.