From: "Ike" Newsgroups: comp.os.msdos.djgpp References: <3 DOT 0 DOT 32 DOT 19990801181614 DOT 007b9130 AT mail DOT colba DOT net> Subject: Re: BITMAP pointers w/ Allegro. Date: Mon, 2 Aug 1999 14:35:25 -0700 Lines: 16 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 NNTP-Posting-Host: tc4-20.ismi.net Message-ID: <37a5e4a8@news.ismi.net> X-Trace: 2 Aug 1999 14:34:16 -0400, tc4-20.ismi.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I've got a question about that, I was asking around on IRC about this problem and they said that its improper programming practice (wow that's hard to say) to have the return value of a function be a pointer. They said that it violates the law of encapsulation. But I've noticed that the Allegro library does it all the time with BITMAP structures, is that bad? > Or, you may want to try this: > > BITMAP *function() { > BITMAP *bmp = create_bitmap(320, 240); > return bmp; > } >