さて、私は大学で例外を学び始めたばかりです。これは、導入された値が私が確立した範囲外の場合に例外をスローすることになっているコードです...考えて分析すると、エラーが発生する可能性があると思いますスローで、そして他の質問で、実際にスローを宣言していないことを誰かが教えてくれます...私は愚かな間違いをしているかもしれませんので、申し訳ありませんが、私のコードは次のとおりです。
    #include <iostream>
#include <exception>
class ExcepcionRango : public std::exception{
protected:
    ExcepcionRango::ExcepcionRango(){
    }
public:
    virtual const char* lanzarExcepcion()=0;
};
class ExcedeRangoInferior : public ExcepcionRango{
public:
    ExcedeRangoInferior::ExcedeRangoInferior(){
    }
    const char* lanzarExcepcion() throw(){ //throw exception
        return "Value out of minimal range";
    }
};
class ExcedeRangoSuperior : public ExcepcionRango{
public:
    ExcedeRangoSuperior::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);
        if(valor<min){
            throw exS->lanzarExcepcion();
        }
        if(valor>max){
            throw exI->lanzarExcepcion();
        }
    }catch(...){
        std::cout<<"Exception: ";
    }
    delete exS;
    delete exI;
    std::cin.get();
}
PD: 関数 lanzarExcepcion() は、挿入された値が範囲外の場合にメッセージをスローすることになっています