... // same as before until the end of the complex output operator
struct mycomplex : public complex {    // Ex36
    int cntCalls;
    mycomplex() : cntCalls(0) {}
    double abs() { cntCalls += 1; return complex::abs(); }
    int calls() { return cntCalls; }
};
int main() {
    mycomplex x, y, z;
    cout << "x:" << x.abs() << " y:" << y.abs() << " z:" << z.abs() << endl;
    cout << "x:" << x.calls() << " y:" << y.calls() << " z:" << z.calls() << endl;
}
