What does a virtual function really do?

Hello. I'm confused on what a virtual function really does. So far, I've learned that a virtual function lets the computer decide which function to execute based on the data type at run time. For example, 2 classes(a base and derived) having 2 same functions names.
Topic archived. No new replies allowed.