Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Regards,
Veeru 7 6862
Veeru wrote:
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Not sure what 'Vptr' you mean. Do you mean 'vtbl'? If so, it is not
defined in C++. It's an ipmlementation detail, and as such has no
representation/definition in C++ proper.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Regards,
Veeru
your question was answered in Marshall Cline's FAQs
see this.. http://www.parashift.com/c++-faq-lit....html#faq-20.4
-- Murali Krishna
Murali Krishna wrote:
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Regards,
Veeru
your question was answered in Marshall Cline's FAQs
see this.. http://www.parashift.com/c++-faq-lit....html#faq-20.4
-- Murali Krishna
i searched in the FAQ but didnt find the answer to my question. i
wanted to know the data type of the Vptr pointer the points to the
Vbtl(virtual table) which contains the function pointers to virtual
functions.
Please help.
Regards,
Veeru
Veeru wrote:
Murali Krishna wrote:
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
>
Regards,
Veeru
your question was answered in Marshall Cline's FAQs
see this.. http://www.parashift.com/c++-faq-lit....html#faq-20.4
-- Murali Krishna
i searched in the FAQ but didnt find the answer to my question. i
wanted to know the data type of the Vptr pointer the points to the
Vbtl(virtual table) which contains the function pointers to virtual
functions.
Please help.
Regards,
Veeru
I think you have faced this in an interview. I have not seen about
VPtr's data-type till now. but as written in FAQs, you can understand
that it is a generic pointer (say void*) to a generic member function
because it stores the starting address of the V-Table.
I guess it is void*.
-- Murali Krishna.
Murali Krishna wrote:
Veeru wrote:
Murali Krishna wrote:
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Regards,
Veeru
>
your question was answered in Marshall Cline's FAQs
>
see this.. http://www.parashift.com/c++-faq-lit....html#faq-20.4
>
-- Murali Krishna
i searched in the FAQ but didnt find the answer to my question. i
wanted to know the data type of the Vptr pointer the points to the
Vbtl(virtual table) which contains the function pointers to virtual
functions.
Please help.
Regards,
Veeru
I think you have faced this in an interview. I have not seen about
VPtr's data-type till now. but as written in FAQs, you can understand
that it is a generic pointer (say void*) to a generic member function
because it stores the starting address of the V-Table.
I guess it is void*.
-- Murali Krishna.
Thanks Murali for such a quick response.
There are two possibilities as far as i can see now:
1. Either Vptr could be a void *
OR
2. V-Table must be some kind of an internal hidden sturture or class.
And the Vptr points to the V-Table. So Vptr could have a data type of
V-Table.
Well, this is just what i can guess.
But still need a confimation.
Regards,
Veeru
Veeru wrote:
>
Murali Krishna wrote:
>Veeru wrote:
Murali Krishna wrote:
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Regards,
Veeru
your question was answered in Marshall Cline's FAQs
see this.. http://www.parashift.com/c++-faq-lit....html#faq-20.4
-- Murali Krishna
i searched in the FAQ but didnt find the answer to my question. i
wanted to know the data type of the Vptr pointer the points to the
Vbtl(virtual table) which contains the function pointers to virtual
functions.
Please help.
Regards,
Veeru
I think you have faced this in an interview. I have not seen about VPtr's data-type till now. but as written in FAQs, you can understand that it is a generic pointer (say void*) to a generic member function because it stores the starting address of the V-Table.
I guess it is void*.
-- Murali Krishna.
Thanks Murali for such a quick response.
There are two possibilities as far as i can see now:
1. Either Vptr could be a void *
OR
2. V-Table must be some kind of an internal hidden sturture or class.
And the Vptr points to the V-Table. So Vptr could have a data type of
V-Table.
Well, this is just what i can guess.
But still need a confimation.
There is no way to confirm this: the c++ standard does not even require that
v-tables exist. In particular, it does not prescribe the types and data
structures used to implement the dispatch mechanism for virtual functions.
Thus, your question does not have a general answer. If you are interested
in how a given implementation does it, then you should ask your question in
a forum dedicated to that particular implementation.
Best
Kai-Uwe Bux
Veeru wrote:
Hi ,
What is the data type of Vptr pointer used in the virtual funtion
mechanism?
i suppose its void. Please correct me if i am wrong...
Your question actually makes no sense - virtual function dispatch is a
language internal feature, and as such has nothing to do with the type
system. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Paul Diffenbach |
last post by:
Can anyone point me to an open source library of /statically
allocated/ data structures?
I'm writing some code that would benefit from trees, preferably self
balancing, but on an embedded system...
|
by: E. Robert Tisdale |
last post by:
What is an object?
Where did this term come from?
Does it have any relation
to the objects in "object oriented programming"?
|
by: Sathyaish |
last post by:
I wanted to practice some Linked List stuff, so I set out to create a
linked list. The plan was to create the following:
(1) A linked list class in Visual Basic
(2) A non-class based linked list...
|
by: jacob navia |
last post by:
I would like to add at the beginning of the C tutorial I am writing
a short blurb about what "types" are. I came up with the following text.
Please can you comment?
Did I miss something?
Is...
|
by: tyler_durden |
last post by:
hi there peeps...
like I say in the topic, I need to do an e-mail program in C language, and
has to be made until the 3th of january..the problem is I'm having some
problems with it.
I was...
|
by: ranjeet.gupta |
last post by:
Dear All
What does exactly below code means
struct File
{
void* data;
};
typedef struct File File;
typedef File* fl;
|
by: pai |
last post by:
Hi,
Can any body explain me about V-table and Vptr ( virtual pointer ).
ANy link is also welcomed.
I didnt get useful explation about the topic .I mean some what detail
explation .
As what...
|
by: Robert.Holic |
last post by:
Hi All (first time caller, long time listener),
I've stumbled across a problem that I have yet to figure out,
although Im sure I'll kick myself when I figure it out. Here it is:
I need to...
|
by: grizggg |
last post by:
I have searched and not found an answer to this question. I ran upon
the following statement in a *.cpp file in a member function:
static const char * const pacz_HTMLContentTypeHeader =...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |