Click here to Skip to main content
15,915,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalgeoreferenced tiff files Pin
jpg6-Jun-02 2:16
jpg6-Jun-02 2:16 
GeneralRe: georeferenced tiff files Pin
Chris Losinger6-Jun-02 2:55
professionalChris Losinger6-Jun-02 2:55 
Generalstl iterator Pin
_Magnus_6-Jun-02 2:10
_Magnus_6-Jun-02 2:10 
GeneralRe: stl iterator Pin
Chris Losinger6-Jun-02 2:57
professionalChris Losinger6-Jun-02 2:57 
GeneralRe: stl iterator Pin
Joaquín M López Muñoz6-Jun-02 2:56
Joaquín M López Muñoz6-Jun-02 2:56 
GeneralRe: stl iterator Pin
_Magnus_6-Jun-02 3:29
_Magnus_6-Jun-02 3:29 
GeneralRe: stl iterator Pin
John M. Drescher6-Jun-02 6:28
John M. Drescher6-Jun-02 6:28 
GeneralRe: stl iterator Pin
Mike Nordell6-Jun-02 10:22
Mike Nordell6-Jun-02 10:22 
From the docs for map::insert

inserting an element invalidates no iterators, and
removing an element invalidates only those iterators
that point at the removed element.


If your AddToMap is adding to this map, you will get those elements back also. What are you really trying to accomplish here? It seems you want to double the size of the map, generating new keys and values based on the previous ones. I don't think I've ever seen such an algorithm before.

But to solve your problem you could create another map object that was a copy of this map and then add to the old map based on this new one. Like:

std::map<whatever> map2(map.begin(), map.end());<br />
iterator itBegin=map2.begin();<br />
iterator itEnd=map2.end();

use these iterators to insert stuff into the original map object.

It's probably not what you really want, but it should do what you explained you want. Smile | :)
GeneralRe: stl iterator Pin
John M. Drescher6-Jun-02 10:21
John M. Drescher6-Jun-02 10:21 
GeneralSysListView32 (Desktop) Pin
[xan]6-Jun-02 2:01
[xan]6-Jun-02 2:01 
GeneralProblem with Adobe SVG ActiveX Pin
6-Jun-02 1:33
suss6-Jun-02 1:33 
GeneralPCM To True Speech WAV Conversion Pin
AJ1235-Jun-02 22:52
AJ1235-Jun-02 22:52 
GeneralRe: PCM To True Speech WAV Conversion Pin
NotYourAverageGuy6-Jun-02 8:12
NotYourAverageGuy6-Jun-02 8:12 
GeneralUnhandled Exception-0xC0000005:Access Violation Pin
Rsh5-Jun-02 22:08
Rsh5-Jun-02 22:08 
GeneralRe: Unhandled Exception-0xC0000005:Access Violation Pin
Joaquín M López Muñoz5-Jun-02 22:12
Joaquín M López Muñoz5-Jun-02 22:12 
GeneralRe: Unhandled Exception-0xC0000005:Access Violation Pin
Rsh6-Jun-02 1:40
Rsh6-Jun-02 1:40 
GeneralRe: Unhandled Exception-0xC0000005:Access Violation Pin
Jim Crafton6-Jun-02 3:25
Jim Crafton6-Jun-02 3:25 
GeneralSocket Question Pin
anotherocd5-Jun-02 20:35
anotherocd5-Jun-02 20:35 
GeneralRe: Socket Question Pin
6-Jun-02 2:25
suss6-Jun-02 2:25 
Generalinstead of Task schedular Pin
hex5-Jun-02 20:04
hex5-Jun-02 20:04 
QuestionRegular Expression in C++. How to? Pin
Atrament5-Jun-02 19:55
Atrament5-Jun-02 19:55 
AnswerRe: Regular Expression in C++. How to? Pin
5-Jun-02 20:11
suss5-Jun-02 20:11 
AnswerRe: Regular Expression in C++. How to? Pin
Stuart Dootson5-Jun-02 20:44
professionalStuart Dootson5-Jun-02 20:44 
GeneralRe: Regular Expression in C++. How to? Pin
Mike Nordell6-Jun-02 3:36
Mike Nordell6-Jun-02 3:36 
AnswerRe: Regular Expression in C++. How to? Pin
Ernest Laurentin6-Jun-02 10:12
Ernest Laurentin6-Jun-02 10:12 

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.