title: no suitable user-defined conversion C++
body: <p>I am making a simple pricer on C++ but I got stuck with a conversion type error.</p>
  
  <p>In brief, I have a class <code>Option</code> which has the method <code>PricingByCRR(BinomialModel Model)</code> where <code>BinomialModel</code> is another class. I inherit publically the class Call from the class Option in the following way:</p>
  
  <pre><code>class Option
  {
  public:
      virtual double Payoff(double s)=0;
      double PricingByCRR(BinomialModel Model);
  private:
      int N;
  };
  
  class Call: public Option
  {
  public:
      void SetK(double K_);
      double Payoff(double s);
  private:
      double K;
  };
  </code></pre>
  
  <p>Here comes my problem: in my main I create a <code>CallOption</code> which is a call but I am not able to apply the method <code>PricingByCRR</code> even though it is supposed to be inherited by the class Option...</p>
  
  <pre><code>int main()
  {
      BinomialModel Model;
  
      if (Model.InputData()==1) return 1;
  
      Call CallOption;
      CallOption.InputData();
      cout &lt;&lt; "European call option price = "&lt;&lt; CallOption.PricingByCRR(Model) &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>The error message I get is</p>
  
  <blockquote>
    <p>no suitable user-defined conversion from 'BinomialModel' to
    'BinomialModel'.</p>
  </blockquote>
  
  <p>This is my BinomialModel:</p>
  
  <pre><code>class BinomialModel
  {
  public:
      double PricingProbability();    // Risk neutral probability; well-known formula
      double S(int n, int i);         // This function computes the stock price at node n, i
      int InputData();                // Entering data
      double GetR();
  
  private:
      double S0;  // Initial value for the stock
      double u;   // The stock's price is u*S0
      double d;   // The stock's price is d*S0
      double r;   // Interest rate
  };
  </code></pre>
  
  <p>It must be a virtuality problem but I am not able to resolve it. Anyone has an idea ? Thanks in advance</p>