Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > A question about member template?

Reply
Thread Tools

A question about member template?

 
 
dolphin
Guest
Posts: n/a
 
      12-16-2007
Hi All,
What is the member template? Is it mean that you can convert one
type to another type?But these two type have a relation?
 
Reply With Quote
 
 
 
 
Kira Yamato
Guest
Posts: n/a
 
      12-16-2007
On 2007-12-16 03:08:31 -0500, dolphin <(E-Mail Removed)> said:

> Hi All,
> What is the member template?


Have you tried googling first?

How many different sites did you try?

Which part of the explanation did you not understand?

> Is it mean that you can convert one
> type to another type?


Templates are not about conversions from one type to another. Perhaps
you meant method overloading, in which case, yes, templates do do this.

> But these two type have a relation?


Overloading?

--

-kira

 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      12-17-2007
On Dec 16, 9:08 am, dolphin <(E-Mail Removed)> wrote:

> What is the member template? Is it mean that you can convert one
> type to another type? But these two type have a relation?


A member template is just like any other template, except for
its scope. A member class template defines a set of classes,
and two different instantiations are two unrelated classes.

--
James Kanze (GABI Software) email:(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance and nitty gritty things like this.member v member foldface@yahoo.co.uk ASP .Net 1 10-07-2004 09:24 AM
Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class. DJ Dev ASP .Net 3 02-08-2004 04:19 PM
How would I use qsort to sort a struct with a char* member and a long member - I want to sort in order of the long member Angus Comber C Programming 7 02-05-2004 06:41 PM
design question - member function argument or pointer member Gert Van den Eynde C++ 8 01-26-2004 05:20 PM
how do I access a member of vector when this vector is a member of a class ding feng C++ 8 07-02-2003 08:06 AM



Advertisments