From: "raelenekelly1" Newsgroups: comp.os.msdos.djgpp Subject: Need a GURU's Help- A Real Puzzler Lines: 61 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Fri, 21 Jun 2002 12:40:28 +1000 NNTP-Posting-Host: 144.134.235.223 X-Trace: newsfeeds.bigpond.com 1024626783 144.134.235.223 (Fri, 21 Jun 2002 12:33:03 EST) NNTP-Posting-Date: Fri, 21 Jun 2002 12:33:03 EST Organization: Telstra BigPond Internet Services (http://www.bigpond.com) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ive Posted This Message On another C++ Board But No one could Really Help Me! int main (int argc,char *argv[]) { Scene level1; level1.LoadTexture ("texture1"); } works without a problem! I can access the texture data from external functions by passing a pointer to level1. Heres the problem! void LoadTextureList (Scene *level) { level->LoadTexture ("tex1"); level->LoadTexture ("tex2"); }; int main (int argc,char *argv[]) { Scene level1; LoadTextureList (&level1); } The structure (as poor as it is) should still work fine! But when i put my load texture function in another function it doesn't. I was thinking it was something to do with the scope of my instance of Scene and hoped someone would have an idea! And Heres The really Bizzare Thing! void LoadTextureList (Scene *level) { level->LoadTexture ("tex2"); level->LoadTexture ("tex3"); }; int main (int argc,char *argv[]) { Scene level1; level1.LoadTexture("Tex1"); LoadTextureList (&level1); } This also works without a problem. Why??? its seems like once the memory is initialised its works without a problem. Now how bizzare is that ?? ah well..Back to the drawing board! if you wanna test the code for yourself no worries.. ill give the engine to ya for your own amuzment!