#include <iostream>
using namespace std;
class F{
int n;
int d;
public:
F( int n, int d): n(n), d(d){
cout << "F construct" << endl;
}
friend ostream& operator<<( ostream& o, const F& f ){
return o << f.n << '/' << f.d;
}
F& operator=( const F& f ){
cout << "operator=" << endl;
n = f.n;
d = f.d;
return *this;
}
};
int main(){
F f1(1, 6);
F f2(); // 这个东东,是一个返回值为 F类型, 函数名为f2的空参函数声明,不是定义一个类哈
F f3;
return 0;
}