虚拟指针 [英] Virtual Pointer
本文介绍了虚拟指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是虚拟指针?
全部,
今天我有一个电话面试,并得到一个问题:什么是虚拟指针?
我在这一个,所以完成后,我尝试谷歌。不幸的是,它给了我一个虚拟表引用。
What is virtual pointer? Hi, ALL, Today I had an telephone interview and got a question: "What is virtual pointer?" I stumbled on this one, so after it was finished, I tried Google. Unfortunately, it gave me a virtual table references only.
那么什么是虚拟指针在简单的英语?
So what is virtual pointer in plain English? How do you define it?
推荐答案
如何定义?
面试官可能有这样的意思:
There are a few things the interviewer might have meant:
- 指向多态类的指针
- 指向多态类的vtable的指针(信用@Maxim)
- 多态类的vtable中的指针
- 一个智能指针对象,重写
operator->
- 指向虚拟成员函数的指针(信用@ Matthieu M)
- A pointer to a polymorphic class
- A pointer to the vtable of a polymorphic class (credit @Maxim)
- A pointer within the vtable of a polymorphic class
- A smart pointer object with an overridden
operator->
- A pointer to a virtual member function (credit @ Matthieu M)
但是,关于,没有这样的事情。
But as far as "virtual pointer" is concerned, there's no such thing.
这篇关于虚拟指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文