But there is the problem. I need to put in a functor, so I don't know the type. And since I cannot define the functor inside the header, I cannot deduce the type.
So I need to hide or post-pone the type in some way. So this is what I wanted to ask. What is good solution for this kind of situation? What are some good techniques?

Originally Posted by Adak

io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.

Originally Posted by Salem

You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

Unfortunately the only other way I know is to make class CVideoEncoderforN8Dlg a template too. But I think you knew that because you said:

... And since I cannot define the functor inside the header, I cannot deduce the type.

About that I do not understand. Functors are types, so you can separate the implementation from design like normal. If the functors themselves are templates, then you can define them in a separate header and include them later. So there would have to be some other reason why you can't deduce the type. I do not think the inheritance precludes this.

Last edited by whiteflags; 12-08-2010 at 09:37 PM.
Reason: mnntioned the wrong type