【发布时间】:2015-05-17 20:06:24
【问题描述】:
请用 C++ 代码帮助我,我已经注释了我想做的任何事情,我有一个类 DEF,它有一个 ABC 类型的向量。 ABC有一些成员。我有另一个类 ZYX,我想在其中使用类 DEF 中的向量迭代 ABC 类的成员。我也不能更改 ABC 和 DEF 类
class ABC{
public:
//some members and other stuff
}
class DEF{
public:
....
vector<ABC> cdf; //ABC is some other class
}
//includes all the necessary part including DEF and ABC
class ZYX{
//iterate over members of ABC using cdf
}
【问题讨论】: