typename/class [modified]
-
Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006
-
Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006
AFAIK one difference is that 1)'typename' can only be used in template definitions. 2) 'class' - could be for both class and template definitions. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006
I think they both have the same effect when are used in template declaration:
template< class T > ...
can be replaced with:template< typename T > ...
Buttypename
keyword has one more meaning when is used within the declared template class. -- modified at 9:32 Wednesday 28th June, 2006 -
I think they both have the same effect when are used in template declaration:
template< class T > ...
can be replaced with:template< typename T > ...
Buttypename
keyword has one more meaning when is used within the declared template class. -- modified at 9:32 Wednesday 28th June, 2006Thanks for the help.:cool: -:KNOX:-
-
Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006
When dealing with templates, there is no difference between them. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac