Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:58:08+00:00 2026-06-07T05:58:08+00:00

Im not exactly sure how much information is needed to answer this, so tell

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:58:10+00:00Added an answer on June 7, 2026 at 5:58 am

    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:

    class SomeType  {
        int number;
    
    public:
        SomeType(int new_number) : number(new_number) {}
        SomeType() : SomeType(42) {}
    };
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not exactly sure how to look this up, but I'm not finding the solution
I was just wondering this the other day. I am not exactly sure how
Not sure exactly what I need to do to make this work, so my
I'm not sure exactly how to explain this, so I'll just start with an
I'm not exactly sure whether or not this is a silly question, but I
Not exactly sure what to call this, but in SQL I often find myself
I am not exactly sure what's happening here - I open a terminal window
Note: I am not exactly sure what to name the question, so if someone
The question title is a bit strange because I'm not exactly sure how to
Forgive my verbosity. I'm not exactly sure how to describe my situation. Given the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.