A question about member template?

Discussion in 'C++' started by dolphin, Dec 16, 2007.

  1. dolphin

    dolphin Guest

    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?
    dolphin, Dec 16, 2007
    #1
    1. Advertising

  2. dolphin

    Kira Yamato Guest

    On 2007-12-16 03:08:31 -0500, dolphin <> 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
    Kira Yamato, Dec 16, 2007
    #2
    1. Advertising

  3. dolphin

    James Kanze Guest

    On Dec 16, 9:08 am, dolphin <> 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:
    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
    James Kanze, Dec 17, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    473
    Victor Bazarov
    Jul 20, 2005
  2. ghager
    Replies:
    6
    Views:
    621
    ghager
    Jan 19, 2006
  3. Peng Yu
    Replies:
    3
    Views:
    769
    Thomas J. Gritzan
    Oct 26, 2008
  4. Hicham Mouline
    Replies:
    0
    Views:
    432
    Hicham Mouline
    Apr 23, 2009
  5. Hicham Mouline
    Replies:
    1
    Views:
    414
    Michael DOUBEZ
    Apr 24, 2009
Loading...

Share This Page