I have just started learning C++ from the book "SAMS Teach Yourself C++ in 21 Days" and the very first exercise (after Hello World) won't compile in g++. I've checked to make sure I wasn't making any typos or anything, and I have definitely typed exactly what it says in the book. Here is the code: and the errors are as follows: Does it have something to do with the compiler, or maybe with my system (Mac OS X 10.4.11 running on a 800 MHz PowerPC G4 iMac)? I saw this same question by a Linux user somewhere else on the internet, and it seems that the consensus there is that the book has made an error. Though this is possible, I have heard many good things about this book from multiple sources, and I kind of doubt that this is the case. Anyway, I hope somebody can help me and reply soon. Thanks in advance, Alex.