65,186
社区成员




#include <iostream>
using namespace std;
class CFenshu
{
int fm,fz;
friend std::ostream & operator <<(ostream& out,const CFenshu& fs);
};
std::ostream & operator <<(ostream& out,const CFenshu& fs)
{
out <<fs.fz <<"/" <<fs.fm;
return out;
}
#include <iostream>
using namespace std;
class CFenshu;
ostream & operator<<(ostream& out,const CFenshu& fs);
class CFenshu
{
int fm,fz;
public:
friend ostream & operator<<(ostream& out,const CFenshu& fs);
};
ostream & operator<<(ostream& out,const CFenshu& fs)
{
out << fs.fz << "/" << fs.fm;
return out;
}
int main()
{
CFenshu fs;
cout << fs << endl;
return 0;
}