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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:55:14+00:00 2026-06-14T13:55:14+00:00

I have two classes with inheritance at the minute, one is a base class

  • 0

I have two classes with inheritance at the minute, one is a base class and contains polymorphism, it is the interface:

#include <vector>
#ifndef _Signal_h
#define _Signal_h
using namespace std;

typedef vector<double> DIMENTIONS_2;

class Signal {

public:

    Signal();
    Signal(const int N, const int M)
    {
        this->width = N;
        this->height = M;
    };

    virtual vector<DIMENTIONS_2> splitSignal(vector<double> &theData) const = 0;
    virtual vector<DIMENTIONS_2> filterSignal(vector<DIMENTIONS_2>&blocks) const = 0;
    virtual vector<double> returnRawSignal() const = 0;

    virtual int zerocross() const = 0;
    virtual double energy() const = 0;
    virtual int zerocrossmap() = 0;
    virtual bool readSignal() const = 0;

protected:

    vector<double> rawSignal;
    int width;
    int height;
};

#endif

And one of the classes that inherits and implements from this:

#include "Signal.h"

#ifndef _Audio_h
#define _Audio_h

typedef vector<double> DIMENTIONS_2;

class Audio : public Signal {

  public:

     Audio();
     Audio(const int N, const int M);

     vector<DIMENTIONS_2> splitSignal(vector<double>&data, int N, int M);
     vector<DIMENTIONS_2> filter(vector<DIMENTIONS_2> &data, double sumthres, double zerothres);

     double energy(vector<double> &blocks);

     int zerocross(vector<double> &block);

     int zerocrossmap(vector<double> &strippedData);

     template<typename T>
     int sign(T n);
 };


 #endif

The Audio class has implementation (.cpp) but whenever I try to compile using this:

g++ Signal.h Audio.h Audio.cpp main.cpp 

I get the following error:

Undefined symbols for architecture x86_64:
“Signal::Signal()”, referenced from:
Audio::Audio() in ccdjMubM.o
Audio::Audio() in ccdjMubM.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Any ideas?

  • 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-14T13:55:15+00:00Added an answer on June 14, 2026 at 1:55 pm

    The constructor Signal() was not implemented. Just added that and it should solve your issue.

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

Sidebar

Related Questions

I have two classes (MVC view model) which inherits from one abstract base class.
I have two classes, one that inherits from the other. The base class is
I have two classes - one base class and one derived from it :
Possible Duplicate: Multiple Inheritance in C# I have two classes Class A and Class
I have two classes, a base class and a derived class. My base class
I have an abstract base class which acts as an interface. I have two
I have two distinct (no inheritance) interfaces: IInvestable and IPricable and two classes: IndexClass
I have implemented inheritance for two parent classes called Table and Field . Each
I have two classes Foo and Bar that Bar extends Foo as below: class
I have some rudimentary question about inheritance in C#. I have two classes. I

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.