title: Invalid abstract type
body: <p>So I have a problem with an abstract class!</p>
  
  <p>This is the Product.h</p>
  
  <pre><code>#ifndef PRODUCT_H
  #define PRODUCT_H
  #include &lt;string&gt;
  
  using namespace std;
  
  class Product
  {
      private:
          string description;
          int d,m,y;
          float weight;
  
      public:
          Product();
          Product(string description,int d,int m,int y, float weight);
          void print();
          virtual bool isExpiring()=0;
  };
  
  #endif
  </code></pre>
  
  <p>This is Product.cpp</p>
  
  <pre><code>#include "Product.h"
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  Product::Product()
  {
      description="";
      d=0;
      m=0;
      y=0;
      weight=0.0;
  }
  
  Product::Product(string description,int d,int m,int y, float weight)
  {
      this-&gt;description=description;
      this-&gt;d=d;
      this-&gt;m=m;
      this-&gt;y=y;
      this-&gt;weight=weight;
  }
  
  void Product::print()
  {
      cout &lt;&lt; "Description: " &lt;&lt; description&lt;&lt;endl;
      cout &lt;&lt; "Expiration date: " &lt;&lt; d &lt;&lt;"/" &lt;&lt; m &lt;&lt; "/" &lt;&lt; y &lt;&lt; endl;
      cout &lt;&lt; "Weight: " &lt;&lt; weight &lt;&lt; endl;
  }
  </code></pre>
  
  <p>This is ShortTermProduct.h</p>
  
  <pre><code>#ifndef SHORTTERMPRODUCT_H
  #define SHORTTERMPRODUCT_H
  #include "Product.h"
  
  class ShortTermProduct : public Product
  {
      public:
          ShortTermProduct();
          void Print();
          bool isExpiring();
  };
  
  #endif
  </code></pre>
  
  <p>This is LongTermProduct.h</p>
  
  <pre><code>#ifndef LONGTERMPRODUCT_H
  #define LONGTERMPRODUCT_H
  #include "ShortTermProduct.h"
  #include &lt;string&gt;
  
  using namespace std;
  
  class LongTermProduct 
  {
      private:
          int lifetime;
          string open, open_date;
  
      public:
          LongTermProduct(int lifetime,string open,string open_date);
          void print();
          bool isExpiring();
  };
  
  #endif
  </code></pre>
  
  <p>And finally this is Fridge.h</p>
  
  <pre><code>#ifndef FRIDGE_H
  #define FRIDGE_H
  #include "LongTermProduct.h"
  class Fridge : public LongTermProduct
  {
      private:
          Product products[10];
  
      public:
          fridge();
          void addShortTermProduct (ShortTermProduct p);
          void addLongTermProduct (LongTermProduct p);
          void printFridgeProducts();
          bool isExpiring();
  };
  
  #endif
  </code></pre>
  
  <p>The errors I am getting are these:</p>
  
  <ul>
  <li>[Error] invalid abstract type 'Product' for 'products'</li>
  <li>[Error] cannot declare field 'Fridge::products' to be of abstract type 'Product'</li>
  </ul>
  
  <p>Any help would be grate !Thanks in advance !</p>