我不完全确定需要多少信息来回答这个问题,所以告诉我是否需要更多信息。C++类不是自己的基础
我修改了一个大的代码,当我突然遇到这条消息时写道:error: type 'integer' is not a direct base of 'integer'
。我知道它的继承问题,但我不会继承其他类。
,是造成这一问题的代码是
integer(const std::string & val, uint16_t base): integer(val.begin(), val.end(), base) {}
和
integer(iterator start, iterator end, uint16_t base)
已被定义。
我需要做些什么来解决这个问题?
编辑:IM与编译-std = C++ 0x中,其中根据答案,我应该能够编译,除非我的编译器很古老:GCC 4.6.2,我认为
更新回答,可在gcc 4.7以上。 – hmjd 2012-07-09 08:11:27