title: Problems with "delete" keyword
body: <p>In the <code>main</code> function</p>
  
  <pre><code>string reader_txt = "Readers.txt";
  string book_txt = "Books.txt";
  
  Reader * obj[10];
  
  // *********** Reading Reader.txt
  
  ifstream reader_input;
  reader_input.open(reader_txt.c_str()); // open file
  
  string reader_name;
  string reader_category;
  int reader_n_category;
  int counter=0;
  
  if(reader_input.is_open())
  {
      while( getline(reader_input, reader_name, '\n') &amp;&amp; getline(reader_input, reader_category, '\n'))
      {
          reader_n_category = atoi(reader_category.c_str());
  
          switch(reader_n_category)
          {
          case FANTASY:
              obj[counter++] = new fantasyReader(reader_name);
              break;
          case MYSTERY:
              obj[counter++] = new mysteryReader(reader_name);
              break;
          case HORROR:
              obj[counter++] = new horrorReader(reader_name);
              break;
          case SCIENCE:
              obj[counter++] = new scienceReader(reader_name);
              break;
          }
      }
  }
  else
      cout&lt;&lt;"Cannot open up the Readers.txt"&lt;&lt;endl;
  
  reader_input.close();   // close file
  </code></pre>
  
  <p><code>reader</code> is base class<br>
  <code>fantasyReader</code>, <code>horrorReader</code>, <code>mysteryReader</code>, <code>scienceReader</code> are derived class.</p>
  
  <p>At the end of <code>main</code> I put:</p>
  
  <pre><code>for(int pos=0; pos &lt; counter; pos++)
  {
       delete obj[pos];  // compiling error, I don't know why
  }
  </code></pre>
  
  <p>I get a compile error:</p>
  
  <blockquote>
    <p>main.obj : error LNK2019: unresolved external symbol <code>"public: __thiscall Reader::~Reader(void)" (??1Reader@@QAE@XZ)</code> referenced in function <code>"public: void * __thiscall Reader::'scalar deleting destructor'(unsigned int)" (??_GReader@@QAEPAXI@Z)</code></p>
  </blockquote>
  
  <p>This wouldn't work. How can or where should I write a <code>delete</code> statement?</p>