In embedded firmware development, base driver classes often expose low-level configuration helpers that accept explicit parameters.
Derived driver classes may add simplified or default configuration APIs using the same function name.
In C++, this can cause name hiding, where the derived function hides all base class overloads with the same name, unintentionally making base functionality inaccessible.
Your task is to fix a name-hiding issue so that both base and derived configuration functions can be used on the same object.
Given Scenario
You are given:
A BaseDriver class that provides a configuration helper:
configure(int value)This represents a generic hardware configuration step using an explicit parameter.
A DerivedDriver class that provides a simplified configuration function:
configure()This represents a default configuration mode.
Because both functions share the same name, the base class function becomes hidden when accessed through a DerivedDriver object.
Objective
Modify the program so that:
Rules (Strict)
You must follow all rules below:
using to expose base class functionsInput
NProgram Flow (Mandatory Order)
NDerivedDriver objectconfigure()configure(N)Example Input
8
Example Output
Derived default configuration
Base configuration value 8 Constraints
Input
8
Expected Output
Derived default configuration Base configuration value 8