Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > how to make a t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 9743 of 9909
Post > Topic >>

how to make a template out of these two class

by Daniel <danwgrace@[EMAIL PROTECTED] > Jun 25, 2008 at 06:17 PM

How do I make a template out of this resmap and resnode cl***** ?  I
think I want the template will take a resnode class as parameter e.g.
template <class resnode> class resmap.
So the resnode class always needs two members mark and handle, mark is
always a boolean and hndtype in the code below will be the only thing
that would change.

typedef int hndtype;

class resnode
{
	public :
	   bool mark;
	   hndtype handle;
};

typedef std::map<std::string, sndnode> maptype;

class resmap
{
		maptype nds;
	public :
		void insert(std::string const &s, hndtype const &hnd);
}

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 4 Posts in Topic:
how to make a template out of these two class
Daniel <danwgrace@[EMA  2008-06-25 18:17:11 
Re: how to make a template out of these two class
Chris Uzdavinis <cuzda  2008-06-26 03:30:36 
Re: how to make a template out of these two class
Daniel <danwgrace@[EMA  2008-06-26 13:28:16 
Re: how to make a template out of these two class
Bart van Ingen Schenau &l  2008-07-01 19:46:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 13:00:31 CDT 2008.