What is a virtual method 2024?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Maritime Organization, Lives in London, UK.
A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.
2023-05-14 06:13:07
评论(499)
Helpful(122)
Helpful
Helpful(2)

Lucas Wilson
QuesHub.com delivers expert answers and knowledge to you.
A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.