undefined reference to 'FileReader :: FileReader()'
<p>Could anyone please help me fix my code so I can compile it.</p>

<p>When I compile it an error message "undefined reference to 'FileReader :: FileReader()'" comes up.</p>

<pre><code>#ifndef SUBFILEREADER_H 
#define SUBFILEREADER_H
#include &lt;string&gt;
#include "FileReader.h"

using namespace std;

class SubFileReader : public FileReader
{
    string sS;
    int iS;
    string sHoldS;
    string siS;

public: 
    SubFileReader();
    string readFile(string file);
};
#endif
</code></pre>

<hr>

<pre><code>#include "SubFileReader.h"
#include "FileReader.h"
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;
#include &lt;sstream&gt;

using namespace std;

/**
 * class SubFileReader, reads a file and prints it to stdout.
 * 
 * @author Alvin Benedicto
 * @version 2.12.10
 */
SubFileReader::SubFileReader() : FileReader()
{
    sS = "asdf";
    iS = 0;
    siS = "";
}

/**
 * readFile, reads the content of the file into a string and prints the string to standard output.
 * @ param file, string file to be read.
 */
string SubFileReader::readFile(string file)
{
    stringstream ints;

    ifstream in(file.c_str());
    while(getline(in, sS))
    {
        ints &lt;&lt; iS++;
        ints &gt;&gt; siS;

        sHoldS += sS + " " + siS + "\n";
    }
    return sS;
}
</code></pre>

<hr>

<pre><code>#include "SubFileReader.h"
#include "FileReader.h"
#include &lt;string&gt;
#include &lt;fstream&gt;
#include &lt;iostream&gt;
using namespace std;

/**
 * main, to test the methods
 * @author Alvin Benedicto
 * @version 2.12.10
 */
int main(int argc, char *argv[])
{
    string str;
    SubFileReader *yz = new SubFileReader();
    str = argv[1];

    ofstream out("MainSubFileReaderTest.txt");
    //cout &lt;&lt; xy-&gt;readFile(str) &lt;&lt; endl;
    out &lt;&lt; yz-&gt;readFile(str);
}
</code></pre>
