Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "In a virtual-inheritance diamond, which constructor initializes the shared virtual base for a complete object?" on CodeWiki (https://codewiki.com/practice/mcq/cpp/inheritance/virtual-base-initializer/).
Context (verbatim from the page):
"""
In a virtual-inheritance diamond, which constructor initializes the shared virtual base for a complete object?
The constructor of the most-derived class
Whichever intermediate base appears first alphabetically
Every intermediate base, producing one shared initialization per path
The virtual base always uses only its default constructor
"""
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.