Mail Archives: djgpp/2001/09/16/03:48:58
From: | "Raf256" <raf256 AT go2 DOT pl>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | static const as array size
|
Date: | Sun, 16 Sep 2001 09:33:01 +0200
|
Lines: | 50
|
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
|
NNTP-Posting-Host: | chello062179024002.chello.pl
|
X-Original-NNTP-Posting-Host: | chello062179024002.chello.pl
|
Message-ID: | <3ba455e7@news.vogel.pl>
|
X-Trace: | news.vogel.pl 1000625639 chello062179024002.chello.pl (16 Sep 2001 09:33:59 +0200)
|
X-Complaints-To: | Usenet AT news DOT vogel DOT pl
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
When compiling :
#include <iostream.h>
class cThrowBasic {
protected :
static const int maxDescrLen;
char description[maxDescrLen];
public : cThrowBasic();
};
const int cThrowBasic::maxDescrLen = 500;
cThrowBasic::cThrowBasic() { }
ostream& operator<<(ostream &out, cThrowBasic a) {
out<<"aaa"; return out;
}
main() { cThrowBasic a; cerr<<a; }
I get :
Error: variable-size type declared outside of any function
Woh can I change this ?
BTW. when changing to
ostream& operator<<(ostream &out, cThrowBasic &a)
then when compiling under DJGPP I get :
Compiling: bug1.cc
In function `int main()':
bug1.cc(18) Error: Internal compiler error in `find_function_data', at
function.c:543
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
There were some errors
--
Raf256 : C C++ VC VB PHP TP Delphi JS Java
,--, _ ,- _ _ _ ,---------------------------------------------,
|,-'`_|_|_ `_||_'|_' | raf256 AT go2 DOT pl
| `\(_) | |_,,_||_| | (SIGN not ready ;)
- Raw text -