Class without parameterless constructor C++
<p>I have a class in my program which is a file parser to provide me with outputs. Since this is a file parse, passing a filename is mandatory to use this class.</p>

<p><strong>FileReader.h</strong></p>

<pre><code>class FileReader{
public:
FileReader(std::string filePath);
//other member functions
private:
//private variables
};
</code></pre>

<p><strong>MainProgram.h</strong></p>

<pre><code>class MainProgram{
public:
FileReader reader; //this gives error
private:
};
</code></pre>

<p><strong>MainProgram.cpp</strong></p>

<pre><code>MainProgram::setup()
{
public:
    reader = new FileReader("files/something.xml") //intended to use like this
}
</code></pre>

<p><strong>Error:</strong> src/MainProgram.h|57|error: no matching function for call to ‘FileReader::FileReader()’|</p>

<p>How do I keep the class with a mandatory parameter during initialization?</p>
