• 2022-06-26
    假定类TEST中重载运算符<<,则运算符<<在类TEST中正确的声明形式为( )
    A: ostream& operator<<(ostream& output, const TEST& obj);
    B: friend ostream& operator<<(ostream& output, const TEST& obj);
    C: ostream& operator<<(const TEST& obj);
    D: friend ostream& operator<<(const TEST& obj);
  • 举一反三