From: "Ike" Newsgroups: comp.os.msdos.djgpp Subject: BITMAP pointers w/ Allegro. Date: Sun, 1 Aug 1999 15:19:23 -0700 Lines: 22 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: tc2-11.ismi.net Message-ID: <37a49d74@news.ismi.net> X-Trace: 1 Aug 1999 15:18:12 -0400, tc2-11.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 beginners question about the BITMAP pointer. I have a program that is generally structured like so: main(void) { BITMAP *bmp; function(bmp); } function(BITMAP *bmp) { bmp = create_bitmap(320, 240); } This small program seems to make 2 bitmap data structures when I only want one, because whenever I try and use the newly created bitmap later in the main() function, it gives me crazy values which seem uninitalized. How do I pass the bitmap by reference so I can edit its value in sub-functions? What am I doing wrong? Thanks for any comments! -Ike