Mail Archives: djgpp/2000/05/13/12:21:35
"Justine Szczap" <jmszczap82 AT adelphia DOT net> writes:
> Can someone please try to tell me what I'm doing wrong here? This is all I
> have in 'main.c':
[snip okay-looking file]
> ... And this is all I have in 'display.h':
> /***** display.h *****/
>
> display_title()
> {
> BITMAP *the_title;
> create_bitmap(640, 480);
^^^^^^^^
the_title = create_bitmap(640, 480);
> clear(the_title);
> }
> ... What am I doing wrong? I have the 'allegro.cfg' file in the same
> directory. Everything seems to compile fine. The only problem is
> when I run the program it ends prematurely and gives a whole bunch
> of data and stack errors, etc. PLEASE HELP... Thanks... - JS
You create a bitmap, but never assign it to the_title. So your
carefully crafted bitmap goes off to the Great Void, and the_title
remains uninitialized, causing a crash when you try to clear it.
Note that in its present form your manipulations of the_title won't
have any effect, since you never display it to the screen... but you
probably knew that.
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -