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

  • Home
  • SEARCH
  • 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 7637557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:58:16+00:00 2026-05-31T07:58:16+00:00

I am more a C guy but I am currently working on a C++

  • 0

I am more a C guy but I am currently working on a C++ project. That is why i am getting a little confused:

we have an inheritance like this:
Node->MultiNode->RoundAbout

Now some code(for simplicity, I ommitted almost all but the constructors):

class MultiNode : public sim_mob::Node {
public:
    MultiNode(int x, int y) : Node(x, y) {}
...
}

and

class Roundabout : public sim_mob::MultiNode {
public:
    Roundabout() : MultiNode() {}
}

As you can see, the Roundabout() constructor calls MultiNode() constructor without any argument while MultiNode has only one constructor with 2 args :

MultiNode(int x, int y)

Is such a scenario possible? what is the expanation please?

This code compiles well in its original place but when I copied the folder to a testing area to start editing, I get this error(which is sensible to me):
error: no matching function for call to ‘sim_mob::MultiNode::MultiNode()

there is no other similar file or class to suspect misplacing.

error for your reference:

~/workspace/parser5/geospatial$ make
Scanning dependencies of target driver
[ 33%] Building CXX object CMakeFiles/driver.dir/geo5-pskel.cxx.o
In file included from /home/vahid/workspace/parser5/geospatial/geo5-pskel.hxx:134:0,
                 from /home/vahid/workspace/parser5/geospatial/geo5-pskel.cxx:39:
/home/vahid/workspace/parser5/geospatial/Roundabout.hpp: In constructor ‘sim_mob::Roundabout::Roundabout()’:
/home/vahid/workspace/parser5/geospatial/Roundabout.hpp:34:27: **error: no matching function for call to ‘sim_mob::MultiNode::MultiNode()’**
/home/vahid/workspace/parser5/geospatial/Roundabout.hpp:34:27: note: candidates are:
/home/vahid/workspace/parser5/geospatial/MultiNode.hpp:42:2: note: sim_mob::MultiNode::MultiNode(int, int)
/home/vahid/workspace/parser5/geospatial/MultiNode.hpp:42:2: note:   candidate expects 2 arguments, 0 provided
/home/vahid/workspace/parser5/geospatial/MultiNode.hpp:40:7: note: sim_mob::MultiNode::MultiNode(const sim_mob::MultiNode&)
/home/vahid/workspace/parser5/geospatial/MultiNode.hpp:40:7: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/driver.dir/geo5-pskel.cxx.o] Error 1
make[1]: *** [CMakeFiles/driver.dir/all] Error 2
make: *** [all] Error 2

thank you

  • 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-05-31T07:58:18+00:00Added an answer on May 31, 2026 at 7:58 am

    No, you cant do that because no default constructor is available for MultiNode. create a default constructor also that accepts no arguments or provide some default arguments to MultiNode Constructor.

    i.e.

     class MultiNode : public sim_mob::Node {
     public:
          MultiNode(int x, int y) : Node(x, y) {}
           ...
          MultiNode(){
          //....
          }
     };
    

    or

     class MultiNode : public sim_mob::Node {
     public:
          MultiNode(int x = def_x, int y = def_y) : Node(x, y) {}
           ...
          MultiNode(){
          //....
          }
     };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm more of a MS-SQL / PostgreSQL guy, but I'm working on a MySQL
I am horrible with JS more a Python guy :) and I have this
Guys, im more of a MSSQL guy but im working on some MYSQL right
I am a .NET guy but recently have been placed on a Java project.
More particularly - I have a window handle of another running application. This application
More times than I'd like to admit I've had people new to a project
Hi just starting to learn this language, more of a javascript/PHP guy... I can't
I have been pondering on this over the last couple of days. I'm currently
I'm currently setting up a new project, and I have run into a few
I am not a statistics guy but have to deal with quite some data.

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.