delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/18/16:29:12

Message-ID: <37E3DACB.A95FC862@gtcom.net>
From: Krogg <krogg DOT no DOT to DOT spam AT gtcom DOT net>
X-Mailer: Mozilla 4.61 [en] (Win95; U)
X-Accept-Language: en-US,en-GB,en,ja
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro,BITMAP *buffer;
References: <37E1B735 DOT C564EEB AT gtcom DOT net> <05a4d7f6 DOT 74e084f3 AT usw-ex0102-016 DOT remarq DOT com> <37E294DB DOT 87A9535D AT gtcom DOT net> <37e2a574 DOT 0 AT news DOT uni-bielefeld DOT de>
Lines: 68
Date: Sat, 18 Sep 1999 14:32:43 -0400
NNTP-Posting-Host: 12.6.67.189
X-Trace: eagle.america.net 937679803 12.6.67.189 (Sat, 18 Sep 1999 14:36:43 EDT)
NNTP-Posting-Date: Sat, 18 Sep 1999 14:36:43 EDT
Organization: 24hoursupport.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Manni Heumann wrote:
> 
> In article <37E294DB DOT 87A9535D AT gtcom DOT net>, krogg DOT no DOT to DOT spam AT gtcom DOT net wrote:
> 
> >Varence wrote:
> >>
> >>     Also, try declaring BITMAP *buffer at the head of the
> >> function, and buffer = create_bitmap(1024,768) after.  If
> >> you have other instructions prior to this, rather than just
> >> declarations, your compiler might be spewing.
> >>
> >If i understand you correctly
> >then you are saying do this:
> >
> >BITMAP *buffer;
> >int main(void)
> >{
> > buffer=create_bitmap(1024,768);
> >}
> >
> >instead of doing this:
> >
> >int main(void)
> >{
> >BITMAP *buffer=create_bitmap(1024,768);
> >}

[snip]

> 
> No, he meant:
> int main (void)
> {
>     BITMAP *buffer;
>     do_some_other_stuff();
> }
> 
> instead of:
> int main (void)
> {
>     do_some_stuff();
>     BITMAP *buffer;
> }
> 
> This is one of the differences between C and C++. In C you cannot create
> variables anywhere you want to, C++ has serious reasons to allow this.
> 
> --
> 
> Manni

I see,As i am still quite new to C/C++ i hadnt figured this out
yet.Thanks for pointing this out to me.

Be Cool,
 Krogg.

-- 


|"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""|
|      `.`/""""""\,','            my sig is too big,      |
|SEE HIS (  /   \ \' SEE HIS      but its really cool.    |
| FACE    \/<> <>\/   SMILE                               |
|         /   W   \          Visit my ascii art site:     |
|       ,'\_|||||_/`.  http://www.gtcom.net/~krogg/ascii/ |
|     ,','   |||   `.`.     krogg DOT no DOT to DOT spam AT gtcom DOT net    |
|____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019