Virtual function 'BasicMidReader::~BasicMidReader()' conflicts with base class 'base 'TMemoryStream'



 DEVELOP > c-Plus-Plus > Virtual function 'BasicMidReader::~BasicMidReader()' conflicts with base class 'base 'TMemoryStream'

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "tomek"
Date: 26 Nov 2003 07:36:06 PM
Object: Virtual function 'BasicMidReader::~BasicMidReader()' conflicts with base class 'base 'TMemoryStream'
Can anybody explain why can I not get rid of the above message
in the following class definition? [I am using Borland C++ Builder 5.0]
Thank you in advance.
class BasicMidReader : public TMemoryStream
{
//some private date
public:
BasicMidReader(char* FN)
{// some code}
~BasicMidReader() {// some code}
};
.

User: "Rob Williscroft"

Title: Re: Virtual function 'BasicMidReader::~BasicMidReader()' conflicts with base class 'base 'TMemoryStream' 26 Nov 2003 08:44:15 PM
tomek wrote in news:bq3kjp$fui$1@atlantis.news.tpi.pl:

Can anybody explain why can I not get rid of the above message
in the following class definition? [I am using Borland C++ Builder 5.0]
Thank you in advance.


class BasicMidReader : public TMemoryStream
{
//some private date
public:
BasicMidReader(char* FN)
{// some code}

Did you mean <hint> Post real code whenever possible </hint>:
{ /* some code */ }

~BasicMidReader() {// some code}
};

I suspect this is A) a compiler bug, or B) something relating to
C++Builders non-standard language extension (TMemoryStream is a vcl
class) or C) (A) and (B).
So you should probably ask in a borland newsgroup, info here:
http://info.borland.com/newsgroups/
Just a random guess try puting __fastcall in the declaration of
BasicMidReader( char *FN ) i.e __fastcall BasicMidReader( char *FN ),
the dtor possibly needs it too.
HTH.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
.

User: "Andrey Tarasevich"

Title: Re: Virtual function 'BasicMidReader::~BasicMidReader()' conflictswith base class 'base 'TMemoryStream' 01 Dec 2003 12:31:25 AM
tomek wrote:

Can anybody explain why can I not get rid of the above message
in the following class definition? [I am using Borland C++ Builder 5.0]
Thank you in advance.


class BasicMidReader : public TMemoryStream
{
//some private date
public:
BasicMidReader(char* FN)
{// some code}
~BasicMidReader() {// some code}
};

I can only guess. Maybe 'TMemoryStream's destructor has narrower
exception specification? Something like 'TMemoryStream::~TMemoryStream()
throw ()'? I don't know whether Borland's compiler detects this type of
error.
--
Best regards,
Andrey Tarasevich
.


  Page 1 of 1

1

 


Related Articles
Virtual function 'BasicMidReader::~BasicMidReader()' conflicts with base class 'base 'TMemoryStream'
Accessing Base class function using a pointer to a derived class
Can a class call its indirect base's member function?
Private virt function can be called with Base class ptr
Is this valid C++ (protected member of base accessed in derived class function)
pointer to virtual function of a base class
Problem with virtual member function pointer (how to invoke the base?!)
access public function of derived class through base class pointer
calling virtual function from base class
Re: calling virtual function from base class
Re: calling virtual function from base class
calling virtual function results in calling function of base class...
Cannot match void (T::* ptr)() when base class of T defines function
How to prevent a function in base class being overloaded from child class
Cast from void* to base class virtual function problem
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER