title: "Error: Unresolved external symbol" whenever I use a pure virtual function
body: <p>I feel like I'm doing something incredibly stupid, but I simply can't figure out what's wrong with my code.  I even made a super simplified version of the code and the error still occurs:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class c1{
  public:
      c1(){}
      ~c1(){}
  
      virtual int add(int a, int b);
  
  private:
  protected:
  
  
  };
  
  class c2 : c1{
  public:
      c2(){}
      ~c2(){}
  
      int add(int a, int b){
          return a+b;
      }
  
  };
  
  int main(){
  
      c2 c;
      c.add(5,6);
  
  }
  </code></pre>
  
  <p>Can anyone spot what I'm sure is the silliest error of all time?  </p>
  
  <p>Here's the exact error message:</p>
  
  <pre><code>1&gt;main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall c1::add(int,int)" (?add@c1@@UAEHHH@Z)
  </code></pre>