Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "After overload resolution selects a virtual member, what selects the function body for an ordinary call through Base&?" on CodeWiki (https://codewiki.com/practice/mcq/cpp/virtual-functions/final-overrider-selection/).
Context (verbatim from the page):
"""
After overload resolution selects a virtual member, what selects the function body for an ordinary call through Base&?
The complete object's dynamic type determines the final overrider.
The source-file order of the class definitions determines it.
The static type always forces the base implementation.
The access level of the overriding function determines it.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in C++. Where you are unsure, say so.