There is no straightforward analog of this code in C++; the fact that both constructors take two real arguments means that they could not be distinguished by overloading. Smalltalk resembles Eiffel in the use of multiple named constructors, but it distinguishes more sharply between operations ...
These arguments allow the C++ compiler to resolve overloading when multiple constructors exist. But where does the compiler obtain arguments for the A constructor? Adding them to the creation syntax (as Simula does) would be a clear violation of abstraction. The answer adopted in C++ is to ...
Cannot find an overload for ".ctor" and the argument count: "2" Cannot find an overload for "op_Subtraction" and the argument count: "2". Cannot find drive. A drive with the name '"C' does not exist. Cannot find drive. A drive with the name 'E' does not exist. Cannot find p...
These arguments allow the C++ compiler to resolve overloading when multiple constructors exist. But where does the compiler obtain arguments for the A constructor? Adding them to the creation syntax (as Simula does) would be a clear violation of abstraction. The answer adopted in C++ is to ...