Mail Archives: djgpp/1999/08/26/01:53:22
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.
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 -