of Game Programming All in One.
I'll be fair and say that most programming books ship with buggy code, but I'm rather surprised that this one sneaked through:
char *s=""; int n, ax; //display joystick information sprintf(s, "Number of Joysticks: %d", num_joysticks);
Awww, and we are just about to release Allegro 5.... Waste of a book!
Hello, Buffer Overflow.
Let me be the first so say, Congratulations on acquiring the book finally, Evert!
Oh, the book does cover Allegro 4.2, so it is actually a real update. And the code does seem better than what I've seen of the 2nd edition code. Minus the little bugger up there, of course.
EDIT: I don't have the book. I was answering a question on the book's forums (see http://d2337290.u86.mygisol.com/forums/index.php?act=ST&f=7&t=792&s=43c7dc4545e68647de85934380ba2123).
What about conio.h and all that other crap?
Funny you brought this up, Evert. I just saw the second edition of that book in my local bookstore today and was surprised to see Allegro as the engine of choice in it! 
It didn't really cover anything new to me though so I decided not to spend $80 CAD on something I wasn't going to get much out of. But for anyone wanting to learn with Allegro, it does cover a LOT of ground.
--- Kris Asick (Gemini)
--- http://www.pixelships.com
I got started with the second edition of that book. I found it quit helpful, and as a result I am actually working with Allegro.
It also teaches quite a bit about C if you start fixing all the bugs the code has
Did he even test that before getting it published?
It probably worked on his PC with his particular setup. We all know that when it works on our own machines it will surely work on every other OS/compiler combination also!
Try writing a bug-free coding book on your own, you'll see.
As I said, most books have buggy code. This particular example shouldn't (doesn't) even run though...
What about conio.h and all that other crap?
I think it's gone and main now seems to be int main() as it should be. Haven't seen enough code to say for sure though.
Hmm... oh, look, Evert has an account there, must be fun 
A real pity I am starting my holidays this Monday for two weeks, otherwise I may have considered buying it and sending it to you straight from Amazon, if you don't feel like buying it.
Hello, Buffer Overflow.
Not only that, but we also have a non-const C-string pointing to a literal string, something which, off the top of my head, is either bad style or downright illegal, depending on the C/C++ standard used.