using _vptr for accessing virtual funtion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • imvc
    New Member
    • Jun 2007
    • 2

    using _vptr for accessing virtual funtion

    as we can access virtual function using the hidden vptr
    but we can also access virtual private member function
    using _vptr so its a loophole in the language isn't it ?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by imvc
    as we can access virtual function using the hidden vptr
    but we can also access virtual private member function
    using _vptr so its a loophole in the language isn't it ?
    Why should it be a loophole? C and C++ are just YGWYD languages
    (YGWYD == You Get What You Deserve).

    kind regards,

    Jos

    Comment

    Working...