Mail Archives: djgpp/2000/10/09/13:28:16
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Allegro help
|
Organization: | Pin Eight Software http://pineight.8m.com/
|
Message-ID: | <n4p3us0q1qoh2tjnl4oep36jlknpujmr87@4ax.com>
|
References: | <8rpl8c$lni$1 AT neptunium DOT btinternet DOT com>
|
X-Newsreader: | Forte Agent 1.7/32.534
|
MIME-Version: | 1.0
|
Lines: | 48
|
X-Trace: | +rUPLsLD8+cQJATMoeclwG/9TjeF2SUtBrRcr/YRj6YcZgQWGNghO2qTxHqGT4cg/j8Yy21n8mfF!6mOxfU0cejzhUmAeOONBh2uBd6/0JcKeG1Q/jmKKb58+la2tgXnEeRVzly7yDkMl9dVZvmhOfF1E!NYNB6Q==
|
X-Complaints-To: | abuse AT gte DOT net
|
X-Abuse-Info: | Please be sure to forward a copy of ALL headers
|
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly
|
NNTP-Posting-Date: | Mon, 09 Oct 2000 15:32:27 GMT
|
Distribution: | world
|
Date: | Mon, 09 Oct 2000 15:32:27 GMT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
On Sun, 8 Oct 2000 12:14:59 +0100, "Dave Nicholson"
<dave DOT nicholson1 AT btinternet DOT com> wrote:
>I'm using DJGPP and Allegro at the moment but when I make a program all that
>gets shown is a blank screen. I've seen it work once but never again. Anyone
>know why? Heres the code.
>
>#include <iostream.h>
>#include <allegro.h>
>
>int main()
>{
> allegro_init();
> cout << "Ready. Beep." << endl;
> return 0;
>}
You're trying to mix ANSI C++ style I/O with Allegro I/O.
Probably not a good idea in general. Try this code:
#include <allegro.h>
int main()
{
allegro_init();
install_timer();
install_keyboard();
if(set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0)
{
allegro_message("no gfx card\n");
return 1;
}
textout(screen, font, "hello world", 40, 40, 15);
readkey();
return 0;
}
--
<O
( \ GNOME vs. KDE: the game!
X http://pineight.8m.com/nes.htm
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -