gpt4 book ai didi

C++:错误 "... is not derived from type ..."

转载 作者:IT老高 更新时间:2023-10-28 22:59:34 26 4
gpt4 key购买 nike

template<typename T1, typename T2>
class Bimap {
public:
class Data;
typedef Data* DataP;
typedef std::multimap<T1, DataP> T1Map;
typedef std::multimap<T2, DataP> T2Map;

class Data {
private:
Bimap& bimap;
T1Map::iterator it1;
/*...*/
};
};

这给了我这个编译错误:

error: type 'std::multimap<T1, Bimap<T1, T2>::Data*, std::less<_Key>, std::allocator<std::pair<const T1, Bimap<T1, T2>::Data*> > >' is not derived from type 'Bimap<T1, T2>::Data'

这是什么意思?这里有什么问题?

最佳答案

关于C++:错误 "... is not derived from type ...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3746377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com