www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/26/18:55:52

From: pavenis AT lanet DOT lv
Message-ID: <B0000099442@stargate.astr.lu.lv>
To: remove_this_mimo AT restoel DOT net_and_this (mimo), djgpp AT delorie DOT com
Date: Thu, 26 Aug 1999 13:40:32 +0300
MIME-Version: 1.0
Subject: Re: c++ const definition in djgpp 2.95 problem
In-reply-to: <37c2cd61.5065024@news.kfunigraz.ac.at>
X-mailer: Pegasus Mail for Win32 (v3.12a)
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 25 Aug 99, at 17:28, mimo wrote:

> On Mon, 23 Aug 1999 15:43:58 -0400, "Campbell, Rolf [SKY:1U32:EXCH]"
> <cp1v45 AT NortelNetworks DOT com> wrote:
> 
> >mimo wrote:
> >
> >> i used to define my constants like this, following advice by someone
> >> who seemed to understand the ansi/iso c++ declaration:
> >>
> >> class c{
> >>
> >>   const char cszText[] = "Text";
> >>   const int ciNumber = 5;
> >
> >    Why would you want to have constant member variables?  I think you
> >should be using constant static member variables.
> >
> >class c {
> >  static const char cszText[];
> > };
> >
> >const char c::cszText[] = "Text";
> >
> >I haven't tested that, and it might not work.  You might have to use 'char
> >*' instead of 'char []' but that shouldn't make any difference if they are
> >constants.
> 
> thanks for trying to help me, but i tried your proposition and it
> resulted in an internal compiler error - see dump...
> ---
>  Compiling: dbbf.cpp
>  In method `CDoubleBuffer::~CDoubleBuffer()':
>  src/main/double/dbbf.cpp(41) Error: Internal compiler error in
> `find_function
>  Please submit a full bug report.
>  See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.

'Internal compiler error' means that You have run into bug in compiler. 
Please read instructions at URL mentioned above and submit full bug 
report as it is told in these instructions.

Andris

>  There were some errors
> ---
> i m not sure if this does have to do with the static declaration,
> anyway i miss my old style of declaring things in header files to be
> easily retraceable...
> 
> cheers
> 
> mimo
> 
> btw.: i m sorry but i can't post the source-code. as far as the
> problem is concerned i think it should be easy to reproduce the thing
> by reading this thread.
> 
> 
> 


- Raw text -


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