call to constructor of 'extClockType' is ambiguous extClockType time2;

The error message "call to constructor of 'extClockType' is ambiguous" indicates that there is more than one constructor in the class 'extClockType' that can be called with the given arguments, and the compiler is unable to determine which one to use.

To understand this error, let's break down the steps involved:

  1. The line of code extClockType time2; is encountered by the compiler. It is attempting to create an object of type 'extClockType' using the default constructor.

  2. The compiler searches for a constructor in the 'extClockType' class that matches the arguments provided. Since no arguments are provided, it is looking for a constructor with no parameters.

  3. The compiler finds multiple constructors in the 'extClockType' class that have no parameters, leading to the ambiguity. This means that there are multiple ways to create an object of type 'extClockType' without any arguments.

  4. The compiler is unable to determine which constructor to use, as there is no clear distinction between the available constructors in terms of their parameters. Hence, it throws an error stating that the call to the constructor is ambiguous.

To resolve this issue, you can take one of the following steps:

  • Specify the constructor explicitly: If you know which constructor you want to use, you can provide the necessary arguments to create the object. For example, if there is a constructor that takes an integer argument, you can use extClockType time2(10); to create an object with the value 10.

  • Modify the constructors: If you have control over the 'extClockType' class, you can modify the constructors to have different parameter types or different numbers of parameters. This will help the compiler distinguish between the constructors and resolve the ambiguity.

Note: It's important to consider the specific details of the 'extClockType' class and its constructors to determine the best course of action to resolve the ambiguity.