Click here to Skip to main content
15,896,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CListCtrl such problem under windows XP [modified] Pin
Rolf Kristensen24-Oct-08 13:55
Rolf Kristensen24-Oct-08 13:55 
GeneralRe: CListCtrl such problem under windows XP Pin
fantasy121525-Oct-08 17:59
fantasy121525-Oct-08 17:59 
GeneralRe: CListCtrl such problem under windows XP Pin
Rolf Kristensen27-Oct-08 11:55
Rolf Kristensen27-Oct-08 11:55 
QuestionSHBrowseForFolder is slow sometimes Pin
bob1697224-Oct-08 4:03
bob1697224-Oct-08 4:03 
Question"SHFILEOPSTRUCT" syntex create problem [modified] Pin
m_mun24-Oct-08 3:20
m_mun24-Oct-08 3:20 
AnswerRe: "SHFILEOPSTRUCT" syntex create problem Pin
SandipG 24-Oct-08 3:29
SandipG 24-Oct-08 3:29 
QuestionRe: "SHFILEOPSTRUCT" syntex create problem Pin
David Crow24-Oct-08 5:09
David Crow24-Oct-08 5:09 
QuestionProblem with stl map Pin
Laan8224-Oct-08 1:43
Laan8224-Oct-08 1:43 
Hi all,

I'm Trying to make some operation on a map. Unfortunately I have to make a massive use of pointers I'm not very expert In their use. I define the map in this way:

map<string,list><celement*>*> m_Layers;

In this map I want to change the key associated with two list. So The task I want to do is this:
if there is two entry one has a string called string1 and a list called list1, the other has string string2 and list list2. I want to change the key associated with the two lists so string1 is associated with list2 and string2 is associated to list1. I have thought to save the lists of interests in two extern lists and then to re-insert them with the key changed but I'm not able to erase the list present in the map because I use the pointer in a bad way the code I do (I Know that is wrong) is this:
<br />
       string layerName = "layer1"<br />
	map<string,list><celement*>*>::iterator mapIter = m_Layers.find(layerName);<br />
	string levelToDown = mapIter->first;<br />
	list<celement*>* listaToDown = mapIter->second;<br />
	mapIter--;<br />
	string levelToUp = mapIter->first;<br />
	list<celement*>* listaToUp = mapIter->second;<br />
	m_Layers.erase(mapIter);<br />
        m_Layers.erase(m_Layers.find(levelToUp));<br />
	pair<string,list><celement*>*> entry = pair<string,list><celement*>*>(levelToDown,listaToUp);<br />
	entry = pair<string,list><celement*>*>(levelToUp,listaToDown);<br />
<br />

AnswerRe: Problem with stl map Pin
led mike24-Oct-08 4:37
led mike24-Oct-08 4:37 
GeneralRe: Problem with stl map Pin
jeron124-Oct-08 4:47
jeron124-Oct-08 4:47 
GeneralRe: Problem with stl map Pin
David Crow24-Oct-08 5:12
David Crow24-Oct-08 5:12 
GeneralRe: Problem with stl map Pin
led mike24-Oct-08 6:10
led mike24-Oct-08 6:10 
QuestionInstalled products in Windows Pin
Krishnakumartg24-Oct-08 0:54
Krishnakumartg24-Oct-08 0:54 
AnswerRe: Installed products in Windows Pin
Phil J Pearson24-Oct-08 1:10
Phil J Pearson24-Oct-08 1:10 
GeneralRe: Installed products in Windows Pin
Krishnakumartg24-Oct-08 1:14
Krishnakumartg24-Oct-08 1:14 
GeneralRe: Installed products in Windows Pin
Rajesh R Subramanian24-Oct-08 1:39
professionalRajesh R Subramanian24-Oct-08 1:39 
GeneralRe: Installed products in Windows Pin
Rajesh R Subramanian24-Oct-08 1:43
professionalRajesh R Subramanian24-Oct-08 1:43 
GeneralRe: Installed products in Windows Pin
Phil J Pearson24-Oct-08 2:11
Phil J Pearson24-Oct-08 2:11 
AnswerRe: Installed products in Windows Pin
David Crow24-Oct-08 5:13
David Crow24-Oct-08 5:13 
QuestionHow to know whether a handle is opened or colsed ? Pin
kapardhi23-Oct-08 22:46
kapardhi23-Oct-08 22:46 
AnswerRe: How to know whether a handle is opened or colsed ? Pin
Cedric Moonen23-Oct-08 22:53
Cedric Moonen23-Oct-08 22:53 
Questionscroll bar for a group-box control. Pin
gayatri.neelema23-Oct-08 22:10
gayatri.neelema23-Oct-08 22:10 
AnswerRe: scroll bar for a group-box control. Pin
Iain Clarke, Warrior Programmer23-Oct-08 23:50
Iain Clarke, Warrior Programmer23-Oct-08 23:50 
AnswerRe: scroll bar for a group-box control. Pin
Rajesh R Subramanian24-Oct-08 0:00
professionalRajesh R Subramanian24-Oct-08 0:00 
GeneralRe: scroll bar for a group-box control. Pin
gayatri.neelema24-Oct-08 0:36
gayatri.neelema24-Oct-08 0:36 

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.