1
Reply

About templetes C++

siabanie banie

siabanie banie

Jan 24 2012 9:22 PM
1.6k
Hi all,

I like to ask about templates: as for example we have derived template class:

template <class T> class TwoDimArray : public Array < Array <T> > {
    public:
             TwoDimArray();
}

I know that the derived template class snippets above is legal but why? 

Can anyone explain to me as I thought it is not allowed? And I also like to know what is the purpose of the spaces in the < Array<T> >, are they necessary? If so why?

Answers (1)