boost实用工具tuple
X(const X& u)
{
x = u.x;
}
*/
public:
X(int y = 5):x(y)
{}
friend
ostream& operator <<(ostream& os, const X& u);
};
ostream& operator <<(ostream& os, const X& u)
{
os<<"{
"< return os;
}
int main()
{
tuple t(2,'a',0.9);
tuple t1(2,X(2));
cout<
cout<
char arr[] = "hello world";
tuple t3(8,arr);
cout<<"t3:"< t3.get<1>()[0] = 'Y';
cout<<"t3:"< return 0;
}
阅读(939) | 评论(0) | 转发(0) |