Thread: member templates question

  1. #1
    Registered User
    Join Date
    Dec 2005

    Question member templates question

    I'm trying to learn member templates on this site..
    http://<br /> http://www.informit.c...qNum=263<br />

    this actually confuses me...
    template <class T> class Array
    //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 "??


  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    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
    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, 02:08 PM
  3. Member Function Question
    By loopshot in forum C++ Programming
    Replies: 3
    Last Post: 11-30-2004, 01: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