开发者

What is 'v' in vtable?

开发者 https://www.devze.com 2022-12-15 02:55 出处:网络
What does v indicate in vtabl开发者_如何学Goe or vptr The \'v\' stands for \'Virtual\'.The vtable is a common method by which virtual function calls are implemented.It contains pointers to a particula

What does v indicate in vtabl开发者_如何学Goe or vptr


The 'v' stands for 'Virtual'.


The vtable is a common method by which virtual function calls are implemented. It contains pointers to a particular class instantiation's versions of any virtual functions that class implements. When you call a virtual function, the compiler will create code that loads it address from the vtable, and branches to that address.

0

精彩评论

暂无评论...
验证码 换一张
取 消