They are syntax errors, and they mean exactly what the error messages say. The actual mistake may correspond directly to the error message, but sometimes a mistake changes the "shape" of the code such that the compiler detects a syntax error that appears a little further away from the mistake made, but nonetheless the error message and line number gives you a starting point to start searching for the mistake. (This could be the case for the first error you listed.)
That just means that you need to look more carefully: they are not fine at all.Originally Posted by solidusMGS
If you have really looked very carefully and it is true that the code is exactly the same as in your book, then either the book is rubbish, or the compiler that you're using is rubbish. But it's more likely due to typo errors by you.