Im not exactly sure how much information is needed to answer this, so tell me if more information is needed.
Im modifying a large code i wrote when i suddenly encountered this message: error: type 'integer' is not a direct base of 'integer'. i know its an inheritance problem, but im not inheriting other classes.
The code that is causing this problem is
integer(const std::string & val, uint16_t base): integer(val.begin(), val.end(), base) {}
and
integer(iterator start, iterator end, uint16_t base)
has been defined.
What do I need to do to fix this?
EDIT: im compiling with -std=c++0x, which according to the answers, i should be able to compile, unless my compiler is old: gcc 4.6.2 i think
It looks like you’re trying to call another constructor directly. You can’t do that in C++03, but you can do exactly that in C++11:
You’ll need g++ 4.7 or newer for this to work, 4.6 doesn’t support this feature yet, even with -std=c++0x, which I tested with both versions on my system.