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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:23:07+00:00 2026-06-05T17:23:07+00:00

Well, I was trying to fix this program, and I keep getting the errors

  • 0

Well, I was trying to fix this program, and I keep getting the errors :

Error 1 error LNK2019: unresolved external symbol “public: __thiscall ExcedeRangoInferior::ExcedeRangoInferior(void)” (??0ExcedeRangoInferior@@QAE@XZ) referenced in function _main

Error 2 error LNK2019: unresolved external symbol “public: __thiscall ExcedeRangoSuperior::ExcedeRangoSuperior(void)” (??0ExcedeRangoSuperior@@QAE@XZ) referenced in function _main

Here is the code:
The program asks for a value, and it throws an exception if the value exceeds a minimal or a maximal range

    #include <iostream>
#include <exception>


class ExcepcionRango : public std::exception{
protected:

    ExcepcionRango();
public:
    virtual const char* lanzarExcepcion()=0;

};

class ExcedeRangoInferior : public ExcepcionRango{
public:
    ExcedeRangoInferior();
    const char* lanzarExcepcion() throw(){ //throw exception
        return "Value out of minimal range";
    }
};

class ExcedeRangoSuperior : public ExcepcionRango{
public:
    ExcedeRangoSuperior();
    const char* lanzarExcepcion() throw(){ //throw exception
        return "value out of maximal range";
    }
};

int obtainValue(int minimo, int maximo){ //obtain value

    int valor; //value
    std::cout<<"Introduce a value between "<<minimo<<" and "<<maximo<<" : "<<std::endl;
    std::cin>>valor;
    return valor;

};

int main(){
    ExcedeRangoSuperior* exS = new ExcedeRangoSuperior();
    ExcedeRangoInferior* exI= new ExcedeRangoInferior();
    int min=3; 
    int max=10;
    int valor=0; //value
    try{
        valor=obtainValue(min,max);
    }catch(int){
        if(valor<min){

            exS->lanzarExcepcion();
        }
        if(valor>max){

            exI->lanzarExcepcion();
        }
    }

    delete exS;
    delete exI;
    std::cin.get();
}

PD:This was a homework, and its objective was to fix its errors, and get it running properly, and as I saw with the last thing I asked here, it seems that this code can show more errors, like syntax errors, maybe design and structural errors as well.

  • 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-05T17:23:10+00:00Added an answer on June 5, 2026 at 5:23 pm

    It looks like you’ve declared constructors for all of your exception types, but you haven’t defined those constructors anywhere. You’re getting linker errors saying that the constructor implementation isn’t being found. Try declaring these functions. For example:

    ExcedeRangoInferior::ExcedeRangoInferior() {
         // Implement me!
    }
    ExcedeRangoSuperior::ExcedeRangoSuperior() {
         // Implement me!
    }
    

    Hope this helps!

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

Sidebar

Related Questions

Hi guys thanks for pay attention to this. Well im trying to replace every
I am trying to figure why this error is happening and determine if it
I got this program that worked well 2 weeks ago, I didn't change any
Okay, I've been trying to fix this for the past week or so, and
I have this program I'm trying to reverse engineer. I don't know whether or
I'm having a problem when trying to compile the program in this tutorial from
Im trying to read files with from the server. This works pretty well but
Well im trying to write my own custom control extender but i can't get
well iam trying to get version of IE used by user by using $.browser.version
Well,I am trying to do something similar what I did in Adobe Flex.Consuming a

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.