|
Mouse-enabled program immediately exits due to error |
David_at_wedu
Member #7,407
June 2006
|
Chances are, this problem reeks of newbieness -- that maybe I'm just not initializing something right -- but it's a problem nonetheless. A program I copied from the book I'm reading, for the sake of messing around with mouse input, compiles just fine, but every time I execute it, the program immediately crashes and gives me one of those "Do you wish to report this error to MS?" dialogs. If it helps to produce a solution, I'm working on a notebook computer with Windows XP Profesional. I'm kind of baffled here. Here's the code:
If anyone can help, it would be greatly appreciated! |
miran
Member #2,407
June 2002
|
Why do you not do any error checking? EDIT: Oh yeah, I see now. You're reading that book... Solution: check for errors and it will soon all be clear. Most probably one or more bitmaps that you try to load can't be loaded. -- |
count
Member #5,401
January 2005
|
What is this famous book, that people talk about here on the boards from time to time?
|
gnolam
Member #2,030
March 2002
|
The Necronomicon All In One, by Jonathan Alhazred. -- |
David_at_wedu
Member #7,407
June 2006
|
Quote: What is this famous book, that people talk about here on the boards from time to time? It's called Game Programming All in One: second edition and the author is Jonathan Harbour. I really don't think the book is all that bad, but I have picked up on some of what people here have been saying in regards to bad coding practices, how he's basically anti-C++ (because he probably doesn't get it), and apparently the guy's a jerk if anyone dares to call him on any of his mistakes. But, if the book gets me at least rolling on working with Allegro -- I'm about halfway through the book -- then I'll be happy. |
BrknPhoenix
Member #7,304
June 2006
|
I found the book pretty handy to get started, as well as for random things here and there, but now that I'm started I've pretty much already left that book behind As soon as the example programs in it started crashing I knew something was terribly wrong, hehe. I don't know why he hates C++ though I went ahead and put all my allegro stuff in classes anyway, screw him >_> |
David_at_wedu
Member #7,407
June 2006
|
Quote: As soon as the example programs in it started crashing I knew something was terribly wrong, hehe. I haven't really had any of the examples crash, save for a few that used variable names that were defined elsewhere already (MAX comes to mind). Other than that, I've only encountered depreciated text handling functions, which I quickly looked up in the Allegro manual and updated. Still, I do wish the book were C++-centric, if only because I learn better off seeing examples. |
|