From: "Vermin" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Help... classes and optimization problem Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: NNTP-Posting-Host: 130.67.72.139 X-Complaints-To: news-abuse AT nextra DOT no NNTP-Posting-Date: Mon, 28 May 2001 17:37:13 MET DST Organization: Nextra Public Access X-Trace: readme.online.no 991064233 130.67.72.139 Date: Mon, 28 May 2001 17:39:48 +0200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This is the constructor and the function it calls: palette::palette(char *file){ LoadPal(file); } bool palette::LoadPal(char *file){ uchar sLength = strlen(file); char ext[4]; strcpy(ext, (file + sLength - 4)); strupr(ext); if (strcmp(ext, ".PAL") == 0){ return LoadPALpal(file); }else if (strcmp(ext, ".PCX") == 0){ return LoadPCXpal(file); }else if (strcmp(ext, ".BMP") == 0){ return LoadBMPpal(file); }else{ return false; } } I'm sure that the problem is located in the constructor, since when I use the default constructor, it all works well...