#include <iostream>
class SomeClass
{
private:
int m_a;
int m_b;
public:
SomeClass(int a, int b) : m_a(a), m_b(b){}
friend std::ostream& operator<<(std::ostream& os, const SomeClass& someClass)
{
os << someClass.m_a << " :: " << someClass.m_b;
return os;
}
};
int main()
{
SomeClass someClass(20, 50);
std::cout << someClass;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgU29tZUNsYXNzCnsKcHJpdmF0ZToKCWludCBtX2E7CglpbnQgbV9iOwoJCnB1YmxpYzoKCVNvbWVDbGFzcyhpbnQgYSwgaW50IGIpIDogbV9hKGEpLCBtX2IoYil7fQoJZnJpZW5kIHN0ZDo6b3N0cmVhbSYgb3BlcmF0b3I8PChzdGQ6Om9zdHJlYW0mIG9zLCBjb25zdCBTb21lQ2xhc3MmIHNvbWVDbGFzcykKCXsKCQlvcyA8PCBzb21lQ2xhc3MubV9hIDw8ICIgOjogIiA8PCBzb21lQ2xhc3MubV9iOwoJCXJldHVybiBvczsKCX0KfTsKCmludCBtYWluKCkgCnsKCVNvbWVDbGFzcyBzb21lQ2xhc3MoMjAsIDUwKTsKCQoJc3RkOjpjb3V0IDw8IHNvbWVDbGFzczsgCgkKCXJldHVybiAwOwp9