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 - C++ Learning > map of cl*****
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4121 of 4370
Post > Topic >>

map of cl*****

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

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
tan12V112 Fri Nov 21 22:44:29 CST 2008.