This is working. I didn't actually write this code, it's from an example project I used as a "starting point" for my own project.

Here is what I want to change - in the template declaration (parameter list), VoiceClass is a parameter which represents a class with a constructor expecting no arguments. I have changed the signature of the constructor of VoiceClass so that it now expects a single parameter/argument, of class XXX.

How do I syntactically change these two statements (above) so the invoking call will pass a single argument of class XXX to the template, which will in turn pass that argument on the VoiceClass constructor?

I am embarrassed to admit how much time I have wasted trying to figure this out. Pages and pages of documents of cryptic articles on C++ templates and template specialization have been digested, and I'm as confused as ever.

Can anyone help me? Please, if possible, no long winded abstractions on the finer points of C++, my brain is tired. I just need to get this undoubtedly simple syntactical change in place so I can continue with my project.

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Ask a Question