instance of generic classes

Hi -

I'm trying to create a generic class with template functions (first time doing this). The class looks something like this:

1
2
3
4
5
template <class T> class ModGain
{
private:
    vector  <T> regArray;
...

I'm trying to create an instance of this class within another class, like this:

1
2
3
4
class ModCic
{
private:
    ModGain<FlipFlopReg64>  gain;


(FlipFlopReg64 is another class that I've created.)

I'm getting an error (several, actually) about "invalid use of template-name 'ModGain' without an argument list."

Can someone please tell me what I'm doing wrong? Thanks.
It sounds like somewhere (not in the code you posted), you are using ModGain without specifying the template type.

For us to diagnose further, you'll have to post the line that's actually causing this error.
Hi, Disch -

Line 4 of my second code block is where this error is occurring.
hrm.... that seems unlikely.

Can you post more of your ModGain class?
Oops...my mistake, Disch. This was originally a non-template class. When I populated the header file with the contents of the source file, I left the source file behind. Once I removed that from my build, it complied fine.

Sorry about the false alarm, though I didn't think my build utility would pick up an unneeded file like that.
Topic archived. No new replies allowed.