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 8833001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:40:24+00:00 2026-06-14T08:40:24+00:00

C++ Constructor Implementation Error I have 2 class Map2D(parent) & Map3D(child) So this is

  • 0

C++ Constructor Implementation Error

I have 2 class

Map2D(parent) & Map3D(child)

So this is what happen…

class Map3D : public Map2D
{
private:
int z;

public:
Map3D();
Map3D(int,int,int);
int getZ();

}

And below is my Map2D

class Map2D
{

friend ifstream& operator>>(ifstream&, Map2D&);

protected:
int x;
int y;

public:
Map2D();
Map2D(int,int);

};

Map2D::Map2D()
{
x=0;
y=0;
}

Map2D::Map2D(int xIn,int yIn)
{
x = xIn;
y = yIn;
}

The problem now is i try to implement Map3D but got issue.. which what i try is below

Back on Map3D.cpp

Map3D::Map3D()
{
x=0;
y=0;
z=0;
}

Map3D::Map3D(int xIn,int yIn,int zIn)
{
x=xIn;
y=yIn;
z=zIn;
}

map3d.cpp:18:1: error: extra qualification ‘map3D::’ on member ‘map3D’ [-fpermissive]
map3d.cpp:18:1: error: ‘map3D::map3D()’ cannot be overloaded
map3d.cpp:14:1: error: with ‘map3D::map3D()’
map3d.cpp:25:1: error: extra qualification ‘map3D::’ on member ‘map3D’ [-fpermissive]
map3d.cpp:25:1: error: ‘map3D::map3D(int, int, int)’ cannot be overloaded
map3d.cpp:15:1: error: with ‘map3D::map3D(int, int, int)’

What should i change to make my implementation correct. Thanks for all help.

  • 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-14T08:40:26+00:00Added an answer on June 14, 2026 at 8:40 am

    Looks like a missing semi-colon at the end of the Map3D declaration

    class Map3D : public Map2D
    {
    private:
    int z;
    
    public:
    Map3D();
    Map3D(int,int,int);
    int getZ();
    
    }; // SEMI-COLON HERE!!!!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class constructor like this: public JavoImageCorrectedDataHeader() { ByteBuffer buffer = ByteBuffer.allocate(this.size());
I have a constructor method similar to this: public class Foo { public Foo
I have a class with a templated constructor for implicit move conversion, however this
I have one constructor function, which acts as a superclass: Bla = function(a){this.a =
I have a class constructor that expects a reference to another class object to
I have this class that has a static member. it is also a base
Just imagine you have the following class [DataContract] public class NamedList { [DataMember] public
I have this abstract base class ODESolver: //ODESolver.h #ifndef ODESolver_H #define ODESolver_H #include doublependulum.h
So, I have an abstract class Panel and an implementation of it MyPanel .
I have a very basic and simple class like this: unit Loader; interface uses

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.