Template class help??

nyi nge nyinge78@yahoo.com
Mon Mar 22 02:43:00 GMT 2004


Hi all,

I need help with template class. Say I have a template
array class with non-type argument:

template<class D, int size=10> class aType {
   public:
     D *data;
     aType(){data = new D[size]}
     ...
}

What I want to do is use it typedef. If there is no
non-type template argument 'size', just only class D,
I can use typedef aType<int> intarray; But here I
can't use typedef as int can be all integers. Is there
any way to do this? Thanks.

Nyinge

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



More information about the Gcc-help mailing list