This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Template class help??
- From: nyi nge <nyinge78 at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 21 Mar 2004 11:50:29 -0800 (PST)
- Subject: Template class help??
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