member templates question

This is a discussion on member templates question within the C++ Programming forums, part of the General Programming Boards category; I'm trying to learn member templates on this site.. http://www.informit.com/guides/conte...lus&seqNum=263 http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=263 " target="_blank">http://<br /> http://www.informit.c...qNum=263<br /> this actually confuses me... ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    50

    Question member templates question

    I'm trying to learn member templates on this site..

    http://www.informit.com/guides/conte...lus&seqNum=263
    http://<br /> http://www.informit.c...qNum=263<br />

    this actually confuses me...
    Code:
    template <class T> class Array
    {
    //...
    public:
    //declaring a member template assignment operator
     template <class T2> 
      Array<T>" operator=(const Array<T2> ");
    };
    is this correct? is this how you really assymetric assignment operator?

    what is the purpose of "??

    TIA.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,820
    I'll hazard a guess by saying that it could be some typo or data corruption that caused ampersands to be replaced by double quotes.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    50
    that can be a possibility, thanks!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. struct accessing member question
    By neesh in forum C Programming
    Replies: 3
    Last Post: 07-30-2008, 02:02 PM
  2. Templates question
    By tezcatlipooca in forum C++ Programming
    Replies: 9
    Last Post: 12-30-2006, 01:08 PM
  3. Member Function Question
    By loopshot in forum C++ Programming
    Replies: 3
    Last Post: 11-30-2004, 12:06 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. Template question
    By grscot in forum C++ Programming
    Replies: 1
    Last Post: 04-29-2003, 03:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21