Thread: class templates

  1. #16
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Also, probably, because since it's a template, you can't add or define functions for an unspecialized class. Therefore you must either explicitly provide the type (template specialization) or add a template declaration before the class and use a template type such as T.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #17
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I think the syntax could have been made differently when C++ was designed, manzoor. However, I ultimately think the reason this specific syntax was chosen was for the designer to easily identify that their class is a template and therefore can easily identify which design elements are part of the template construct.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inherite nonvirtual class functionality
    By DrSnuggles in forum C++ Programming
    Replies: 2
    Last Post: 04-30-2009, 01:52 PM
  2. Class templates and iterators
    By creativeinspira in forum C++ Programming
    Replies: 2
    Last Post: 06-30-2007, 03:35 PM
  3. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 02:33 PM
  4. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM