This may sound odd, and I know I've been on this board all night bombarding you poor souls with my stupid questions, but I've got another. I have a class that is template based. It looks like this:

Code:

template <int A, int B>
class CDRAWBLT
{
...
};

Now, in another class, I have a member function which takes as a parameter a CDRAWBLT reference. My problem is this: I don't know how to get this to work! I've tried everything I can think of to get this to work! I've tried making that one member function template-based, but that doesn't seem to be working, and I've tried to make the whole class template based, but I don't really want that. I've also tried just leaving out the template list while making my other function. I didn't really expect that to work, and it didn't, but anyways...I'm sorry I keep badgering you all, but you're always so helpful! I'm asking one last time (tonight, at least) for your help. Thanks in advance!

In your code, you were making the int a specialization of the template class. Ie. template <int A, int B> class X{...};
Was this what you wanted? Maybe that was what was causing you problems...

08-18-2002

harry_p

Oh thank you so so much! That worked!!! Thank you thank you thank you!!!

Brendan

08-18-2002

harry_p

And no, int is what I wanted. The point of the template was to size a 2d array. Basically, the CDRAWBLT class holds info on what I call "console bitmaps". Obviously, not every bitmap is the same size, so I couldn't just have something like "array[10][10]". So, templates allowed me to size the array according to each object's needs. See what I'm getting at? Thanks so so much again!