From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Please help... Date: 13 May 2000 09:45:06 -0700 Organization: InterWorld Communications Lines: 40 Message-ID: <834s82xuul.fsf@mercury.st.hmc.edu> References: <3m3T4.547$D%2 DOT 8704 AT news1 DOT news DOT adelphia DOT net> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 958236306 45810 134.173.45.219 (13 May 2000 16:45:06 GMT) X-Complaints-To: usenet AT nntp1 DOT interworld DOT net NNTP-Posting-Date: 13 May 2000 16:45:06 GMT User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Justine Szczap" 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