vptr

Discussion in 'C++' started by Rahul, Nov 4, 2007.

  1. Rahul

    Rahul Guest

    Hi Everyone,

    I was wondering what is the datatype of vtpr and what is its access
    specifier (public or private or protected)?
    This is in regard to the inheritance of a class having one or more
    virtual functions.

    Thanks in advance!!!
     
    Rahul, Nov 4, 2007
    #1
    1. Advertising

  2. Rahul

    Bo Persson Guest

    Rahul wrote:
    :: Hi Everyone,
    ::
    :: I was wondering what is the datatype of vtpr and what is its
    :: access specifier (public or private or protected)?
    :: This is in regard to the inheritance of a class having one or more
    :: virtual functions.
    ::

    It is all implementation specific, so we don't know.

    There is not even a requirement to have a vptr, if the compiler can
    perform the required actions without one.


    Bo Persson
     
    Bo Persson, Nov 4, 2007
    #2
    1. Advertising

  3. Rahul

    Guest

    On Nov 4, 3:52 pm, "Bo Persson" <> wrote:
    > Rahul wrote:
    >
    > :: Hi Everyone,
    > ::
    > :: I was wondering what is the datatype of vtpr and what is its
    > :: access specifier (public or private or protected)?
    > :: This is in regard to the inheritance of a class having one or more
    > :: virtual functions.
    > ::
    >
    > It is all implementation specific, so we don't know.
    >
    > There is not even a requirement to have a vptr, if the compiler can
    > perform the required actions without one.
    >
    > Bo Persson



    I think as a user there is no need to know the type,
     
    , Nov 4, 2007
    #3
  4. On 2007-11-04 12:45, wrote:
    > On Nov 4, 3:52 pm, "Bo Persson" <> wrote:
    >> Rahul wrote:
    >>
    >> :: Hi Everyone,
    >> ::
    >> :: I was wondering what is the datatype of vtpr and what is its
    >> :: access specifier (public or private or protected)?
    >> :: This is in regard to the inheritance of a class having one or more
    >> :: virtual functions.
    >> ::
    >>
    >> It is all implementation specific, so we don't know.
    >>
    >> There is not even a requirement to have a vptr, if the compiler can
    >> perform the required actions without one.


    Please do not quote signatures, and please reply to the post to which
    your reply is directed.

    > I think as a user there is no need to know the type,


    I think that as a user there is no way to tell if there is a vptr to
    begin with.

    --
    Erik Wikström
     
    =?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=, Nov 4, 2007
    #4
    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. Veeru
    Replies:
    7
    Views:
    1,258
    tragomaskhalos
    Sep 15, 2006
  2. pai
    Replies:
    4
    Views:
    952
  3. Subhransu Sahoo

    A basic doubt on VPTR and VTABLES

    Subhransu Sahoo, Nov 7, 2006, in forum: C++
    Replies:
    4
    Views:
    354
  4. Thomas Lenz

    vtbl and vptr

    Thomas Lenz, Dec 16, 2008, in forum: C++
    Replies:
    18
    Views:
    1,718
    Laurent Deniau
    Dec 17, 2008
  5. VPTR and VTABLE

    , Dec 1, 2009, in forum: C++
    Replies:
    9
    Views:
    4,176
    James Kanze
    Dec 2, 2009
Loading...

Share This Page