Click here to Skip to main content
15,901,368 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
sarath_babu14-Nov-05 0:09
sarath_babu14-Nov-05 0:09 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jonas Larsson14-Nov-05 1:50
Jonas Larsson14-Nov-05 1:50 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 6:53
professionalStuart Dootson15-Nov-05 6:53 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jörgen Sigvardsson15-Nov-05 9:59
Jörgen Sigvardsson15-Nov-05 9:59 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 19:54
professionalStuart Dootson15-Nov-05 19:54 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jörgen Sigvardsson15-Nov-05 21:14
Jörgen Sigvardsson15-Nov-05 21:14 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 21:24
professionalStuart Dootson15-Nov-05 21:24 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Tim Smith23-Nov-05 4:05
Tim Smith23-Nov-05 4:05 
Except that using count does much more than you need. Much like using strlen/size to test to see if a string is empty. Thus it is a performance problem. Even with a map, count with get the lower bound and then the upper bound for that key. Then it computes the delta of the two iterators. (V7 implementation)

If you want to create some form of a test, create a template function to do the find and then test for end. Then again, you can just use the insert and avoid the needless double search.

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
QuestionCommand Line AND a window? Pin
micr0chip12-Nov-05 1:40
micr0chip12-Nov-05 1:40 
AnswerRe: Command Line AND a window? Pin
Michael Dunn13-Nov-05 12:54
sitebuilderMichael Dunn13-Nov-05 12:54 
GeneralRe: Command Line AND a window? Pin
micr0chip15-Nov-05 6:25
micr0chip15-Nov-05 6:25 
Questionupload binary file using webservices Pin
Liu Shuai8-Nov-05 15:58
Liu Shuai8-Nov-05 15:58 
QuestionHow to handle ctrl+c etc in Shell Extension Pin
Solidcore8-Nov-05 0:15
Solidcore8-Nov-05 0:15 
QuestionHow to create a Service using ATL Pin
snprani7-Nov-05 19:02
snprani7-Nov-05 19:02 
AnswerRe: How to create a Service using ATL Pin
G Haranadh7-Nov-05 19:49
G Haranadh7-Nov-05 19:49 
QuestionActivex Versioning Pin
omaycotte7-Nov-05 10:17
omaycotte7-Nov-05 10:17 
Questionadd page in property sheet Pin
Maddie from Dartford6-Nov-05 19:23
Maddie from Dartford6-Nov-05 19:23 
AnswerRe: add page in property sheet Pin
srinivasa rao dutta12-Nov-05 0:53
srinivasa rao dutta12-Nov-05 0:53 
QuestionGetting messages generated by toolbar buttons click? Pin
Roozbeh693-Nov-05 8:07
professionalRoozbeh693-Nov-05 8:07 
Questionlinker error using CADOConnection Pin
balu chettri2-Nov-05 20:23
balu chettri2-Nov-05 20:23 
QuestionAdding MFC Support to a standard DLL Project Pin
ChemmieBro2-Nov-05 5:50
ChemmieBro2-Nov-05 5:50 
Questiondefinition Pin
D.N.1-Nov-05 20:49
D.N.1-Nov-05 20:49 
AnswerRe: definition Pin
Michael P Butler1-Nov-05 21:14
Michael P Butler1-Nov-05 21:14 
QuestionLink List using STL Pin
itkid28-Oct-05 3:59
itkid28-Oct-05 3:59 
AnswerRe: Link List using STL Pin
Jeff Thompson28-Oct-05 18:37
Jeff Thompson28-Oct-05 18:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.