Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > vptr

Reply
 
 
Rahul
Guest
Posts: n/a
 
      11-04-2007
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!!!

 
Reply With Quote
 
 
 
 
Bo Persson
Guest
Posts: n/a
 
      11-04-2007
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


 
Reply With Quote
 
 
 
 
srikrishanmalik@gmail.com
Guest
Posts: n/a
 
      11-04-2007
On Nov 4, 3:52 pm, "Bo Persson" <b...@gmb.dk> 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,

 
Reply With Quote
 
=?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=
Guest
Posts: n/a
 
      11-04-2007
On 2007-11-04 12:45, wrote:
> On Nov 4, 3:52 pm, "Bo Persson" <b...@gmb.dk> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPTR and VTABLE doublemaster007@gmail.com C++ 9 12-02-2009 09:09 AM
vtbl and vptr Thomas Lenz C++ 18 12-17-2008 10:54 AM
A basic doubt on VPTR and VTABLES Subhransu Sahoo C++ 4 11-07-2006 12:42 PM
Explanation of Vptr and V-table pai C++ 4 10-18-2006 02:09 PM
What is Data Type of Vptr pointer Veeru C++ 7 09-15-2006 10:00 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57