#include <iostream>
using namespace std;
class mystruct
{
private:
int m_a;
float m_b;
public:
mystruct(int x, float y)
{
m_a = x;
m_b = y;
}
friend ostream& operator << (ostream& os, const mystruct& m)
{
os << m.m_a <<" " << m.m_b << endl;
return os ;
}
};
int main()
{
mystruct m = mystruct(5,3.14);
cout << "my structure " << m << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIG15c3RydWN0CnsKICAgIHByaXZhdGU6CiAgICAgICAgaW50IG1fYTsKICAgICAgICBmbG9hdCBtX2I7CgogICAgcHVibGljOgogICAgICAgIG15c3RydWN0KGludCB4LCBmbG9hdCB5KQogICAgICAgIHsKICAgICAgICAgICAgICAgIG1fYSA9IHg7CiAgICAgICAgICAgICAgICBtX2IgPSB5OwogICAgICAgIH0KICAgIGZyaWVuZCBvc3RyZWFtJiBvcGVyYXRvciA8PCAob3N0cmVhbSYgb3MsIGNvbnN0IG15c3RydWN0JiBtKQogICAgewogICAgCW9zIDw8IG0ubV9hIDw8IiAiIDw8IG0ubV9iIDw8IGVuZGw7CiAgICAJcmV0dXJuIG9zIDsKICAgIH0KCn07CgoKaW50IG1haW4oKQp7CgogICAgICAgIG15c3RydWN0IG0gPSBteXN0cnVjdCg1LDMuMTQpOwoKICAgICAgICBjb3V0IDw8ICJteSBzdHJ1Y3R1cmUgIiA8PCBtIDw8IGVuZGw7CgogICAgICAgIHJldHVybiAwOwp9