title: error: no matching function for call
body: <p>I'm calling a one argument constructor and I'm getting an error that seems to read that I'm calling a no argument constructor (which doesn't and shouldn't exist).</p>
  
  <p>This is the error I'm getting</p>
  
  <pre><code>g++ -g -c predictor.C
  In file included from predictor.C:5:
  PHT.C: In constructor 'PHT::PHT(int)':
  PHT.C:5: error: no matching function for call to'TwoBitPredictorTable::TwoBitPredictorTable()'
  TwoBitPredictorTable.C:5: note: candidates are: TwoBitPredictorTable::TwoBitPredictorTable(int)
  predictor.h:25: note: TwoBitPredictorTable::TwoBitPredictorTable(const TwoBitPredictorTable&amp;)
  </code></pre>
  
  <p>Here is the constructor call on line 5 in PHT.C</p>
  
  <pre><code>PHT::PHT(int rows)
  {
      predictor = TwoBitPredictorTable(rows);
  }
  </code></pre>
  
  <p>The class definition for PHT is:</p>
  
  <pre><code>class PHT
  {
  TwoBitPredictorTable predictor;
  
  public:
      PHT(int rows);
      bool update(unsigned int pc, unsigned int ghr, bool outcome);
      bool getPrediction(unsigned int pc, unsigned int ghr);
  };
  </code></pre>
  
  <p>The idea is to make a class PHT which wraps a TwoBitPredictorTable.</p>
  
  <p>I'm pretty new to C++, but after hours of searching for an answer, I'm asking for your help. Thanks in advance :)</p>