TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JONATHAN DE BOYNE POLLARD
from: ADAM MAJER
date: 1998-02-09 17:11:00
subject: Darn Templates

JDBP> AM> template  class TLinkedList
JDBP> AM> /*...*/
JDBP> AM> TLinkedList *List;     <- invalid use of tamplate !?!?!
JDBP>Indeed.  You haven't provided a type for instantiating the template.  
he
JDBP>particular template that you have chosen takes one template parameter, 
o
JDBP>instantiate it with one argument.  For example:
JDBP>        TLinkedList * LinkedListOfIntegers ;
JDBP>        TLinkedList * LinkedListOfChars ;
Now it works!! And I was wondering how the keck will the compiler know
what type of class I wanted from a template. the  brackets do it,
i guess!!
 * SLMR 2.1a * On a clear disk you can seek forever
--- FMail 0.92
---------------
* Origin: The Programmer's Oasis on FIDONET! (1:348/203)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.