大概就是这样:
struct node { vector<int>dat; /* 在这重载 */ };
想要实现这个:
node x; x.dat.push_back(2); cout<<x[0];//想直接调用,输出dat[0]
不搞这个也不是不行,但是要改一大串代码,好麻烦(