![]() |
|
#1
|
|||
|
|||
template <class Data> problem, more than one data typeI'm trying to make a generalized class which can take any type of data type. I know how to input the data type in the main method if I only have one type of data type in that object. But what if I have more than one data type? Like say I have a Keyword object. Keyword has two data type in each.
CPP / C++ / C Code:
Now... when I want to create a Keyword object in the main method how would I do that? It asks me for the data type but I have two data types, how would I declare that? Thanks. Last edited by LuciWiz : 13-Oct-2006 at 13:40.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: template <class Data> problem, more than one data typeQuote:
CPP / C++ / C Code:
|
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error template with C linkage | MichaelS-R | C++ Forum | 6 | 17-May-2006 12:09 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 14:12 |
| Strange C++ code memory leakage problem | gaoanyu | C++ Forum | 7 | 04-Nov-2005 09:09 |
| C++ PhoneBook | marita | C++ Forum | 46 | 12-Jun-2005 13:10 |
| [CONTEST?]Data Structure Test | dsmith | C Programming Language | 2 | 06-Jun-2004 16:13 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The