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

Discussion in 'C++' started by tomek, Nov 27, 2003.

  1. tomek

    tomek Guest

    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}
    };
    tomek, Nov 27, 2003
    #1
    1. Advertising

  2. tomek wrote in news:bq3kjp$fui$:

    > 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/
    Rob Williscroft, Nov 27, 2003
    #2
    1. Advertising

  3. Re: Virtual function 'BasicMidReader::~BasicMidReader()' conflictswith base class 'base 'TMemoryStream'

    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
    Andrey Tarasevich, Dec 1, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tomek
    Replies:
    3
    Views:
    727
    David Fisher
    Nov 30, 2003
  2. Chunhui Han
    Replies:
    2
    Views:
    487
  3. Andreas Lagemann
    Replies:
    8
    Views:
    451
    Mike Wahler
    Jan 10, 2005
  4. Replies:
    11
    Views:
    433
    Steven Bethard
    Nov 16, 2005
  5. Replies:
    7
    Views:
    365
    Richard
    Aug 28, 2006
Loading...

Share This Page