Mail Archives: djgpp/2001/05/25/10:47:09
From: | "Chris Van Extergem" <chris DOT ve AT pandora DOT be>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Deriving from class streambuf
|
Lines: | 45
|
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: | <n6uP6.2496$X03.195337@afrodite.telenet-ops.be>
|
Date: | Fri, 25 May 2001 14:37:07 GMT
|
NNTP-Posting-Host: | 213.224.14.209
|
X-Complaints-To: | abuse AT pandora DOT be
|
X-Trace: | afrodite.telenet-ops.be 990801427 213.224.14.209 (Fri, 25 May 2001 16:37:07 MET DST)
|
NNTP-Posting-Date: | Fri, 25 May 2001 16:37:07 MET DST
|
Organization: | Telenet Internet
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I copied some code from a book, it compiles and (kinda) works with VC++ 6.0,
but when I want to compile with DJGPP, I get following error :
winstream.cpp(8) Error: no matching function for call to
'streambuf::streambuf(char *&, winstrbuf::{anonymous enum})
on this line :
winstrbuf::winstrbuf(int y,int x,int h,int w,int bx,int
vis):streambuf(pbuf=new char[bufsize*2],bufsize),curw(y,x,h,w,bx,vis)
I know where the winstrbuf::{anonymous enum} part comes from :
enum {bufsize=1024}; in my class declaration, so that's not a problem, I
guess
When I look at streambuf.h, I can only find one constructor for streambuf :
streambuf(int flags=0);
When I look at streamb.h (for VC++ 6.0), I find :
streambuf();
streambuf(char *,int);
So that explains why it compiles in VC++ 6.0
My question (at last, I hear you say :) is this : who is right ? I know M$
is known for producing the least conforming compiler, but here it seems the
author of DJGPP got a bit lazy and left out the second constructor. Does
the standard say anything about this ?
Should I add this constructor myself ? Should I just adjust my code ? If
yes, how ?
--
TIA
Chris
--
TIA
Chris
- Raw text -