Talk About Network

Google





Programming > C - C++ Learning > Re: map of obje...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 4121 of 4400
Post > Topic >>

Re: map of objects [ was map of cl*****]

by DerekBaker <Derek@[EMAIL PROTECTED] > Apr 19, 2008 at 10:17 PM

* DerekBaker:
> Why given this:
> 
> C c(5, 6, 7); // C has two ctors: one takes 3 ints, one a single int.
> map<int, C> TestMap;
> 
> is this ok?
> 
> TestMap.insert(make_pair(1, c));
> 
> but not this?
> 
> TestMap[1] = c;
> 
> Thanks


-- 
Derek
 




 3 Posts in Topic:
map of classes
DerekBaker <Derek@[EMA  2008-04-19 22:02:52 
Re: map of objects [ was map of classes]
DerekBaker <Derek@[EMA  2008-04-19 22:17:15 
Re: map of objects [ was map of classes]
DerekBaker <Derek@[EMA  2008-04-19 22:29:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
localhost-V2008-12-19 Wed Jan 7 12:24:08 PST 2009.