I've been trying to create a derived class which calls the constructor of its parent, but I've been getting a syntax error. I've researched everywhere, but I'm not sure why it won't compile.
I've used the examples I found as closely as possible, but no luck. What's wrong with this code?
1) You specify the initialisation list (where you pass arguments to the base class constructor) in the definition of the subclass constructor, not the declaration.
2) In any case, you don't seem to have properly copied the syntax of whatever you were looking at. The initialiser list is supposed to specify the argument that's being passed to the base class constructor. From what you've written, it looks as though you're trying to declare the parameter for the base class constructor - but that's unnecessarily, since you've already declared that at line 14.
For how to use initialiser lists to specify arguments to base class constructors, have a look at that StackOverflow link gunnerfunner posted. I don't think you need to worry about the part of that post that talks about the "using" statement, unless that's specifically necessary for what you want to do.
Also, the tutorial on inheritance on this site talks about the same thing and might be helpful:
../Cipher.h:29:16: error: using declaration cannot refer to a constructor
Also make sure your compiler is C++11 compliant as mentioned in my previous post