title: I keep getting "cannot declare parameter '_inputVerifier' to be of abstract type 'InputVerifier'" error
body: <p>I'm currently converting a project from Java into C++. I'm using base classes as interface classes and I'm using derived classes as a subclass of the &quot;interface&quot; class. Right now, I'm having an issue regarding base and derived classes. Here's some of the code in the CPP file:</p>
  <pre><code>enum class State {
      START, INTEGER, DECIMAL, END
  };
  
  class Edge {
      private:
          State currentState;
          InputVerifier inputVerifier;
          Action action;
          State nextState;
      public:
          Edge(State _currentState, InputVerifier _inputVerifier, Action _action, State _nextState) {
              currentState = _currentState;
              inputVerifier = _inputVerifier;
              action = _action;
              nextState = _nextState;
          }
  };
  
  Edge machine[1] = {
      Edge(State::START, DigitInputVerifier(), ValueIsDigitAction(), State::INTEGER)
  };
  </code></pre>
  <p>And some of the code in the header file:</p>
  <pre><code>class InputVerifier {
      public:
          virtual bool meetsCriteria(char c) = 0;
  };
  
  class Action {
      public:
          virtual InterimResult execute(InterimResult x, char c) = 0;
  };
  
  class ValueIsDigitAction: public virtual Action {
      public:
          InterimResult execute(InterimResult x, char c) override {
              x.setV(c - '0');
              return x;
          }
  };
  
  class DigitInputVerifier: public virtual InputVerifier {
      public:
          bool meetsCriteria(char c) override {
              if (c &gt;= '0' &amp;&amp; c &lt;= '9') {
                  return true;
              }
          return false;
          }
  };
  </code></pre>
  <p>InterimResult is another class but that's not an issue. I've been trying to compile this but one of the errors I keep on getting is <strong>error: cannot declare parameter '_inputVerifier' to be of abstract type 'InputVerifier'</strong>. I've been trying to search this issue up but I'm not having much luck. I'm new to using classes in C++ so I'm trying to learn but I don't understand how to fix this error. If you could, could you explain what a pure virtual function is too? Any help would be greatly appreciated.</p>