I am having issues calling a parent constructor from an inherited class.
Here is how I am trying to call the function:
pFile = fopen(filePath.c_str(), "r");
if (pFile == NULL) {
std::cout << "Error opening file" << std::endl;
}
StatusObj status();
Subclass mcrf_(pFile, status);
and here is the subclass definition
class Subclass : public Superclass {
public:
Subclass(FILE * f_ptr, StatusObj status) : SuperClass(f_ptr, status) {}
};
the SuperClass's constructor looks like this:
SuperClass( FILE * input, StatusObj & status, uint64_t src_id=0 );
So at this point I think I am doing everything right, however when I try to compile I am getting the following error:
/main.cpp:152: error: no matching function for call to ‘SubClass(FILE*&, StatusObj (&)())’
/SubClass.h:23: note: candidates are: SubClass(FILE*, StatusObj)
I know I have a pointer or reference off somewhere - can anyone lend a hand and help me locate it?
Thanks!