Template class help??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux