Click here to Skip to main content
15,899,679 members

Comments by 무명 (Top 5 by date)

무명 7-Sep-14 20:28pm View    
map < string, Material* > m_mapMaterial;
Until now , there was no work required string using the above code .
It is necessary now.
I need to output a string to MFC Edit Control.
The problem is that it 's rarely needed.

map < string, Material* > m_mapMaterial.
Therefore , were questions about whether you can be solved by using only the above code.
The first method CPallini told because of performance issues , can not be used .
무명 7-Sep-14 8:37am View    
As compared with the second method, the following methods are not good?
map < string, pair < string, Material* > >


[use another map, namely map <material, string=""> to perform the inverse look-up.]
If I use the above method ...

map < string, Material* > a;
map < Material*, string > b;
...
string GetString(Material* pMaterial)
{
      return b[pMaterial];
}
void SetMap(Material* pMaterial, string str)
{
      set a, b;
}

It seems confusing.
무명 7-Sep-14 7:50am View    
- No key value.
- Data values ​​exist.
In this situation, seek the key value in the map.
무명 7-Sep-14 7:49am View    
Deleted
- No key value.
- Data values ​​exist.
In this situation, seek the key value in the map.
무명 30-Aug-14 13:17pm View    
Thank you very much for the answer!
Because of the work I now saw the answer. I'm sorry.
(Using Google Translate, please understand grammar.)
The following is exactly what I want.

Change the path of the root item.
Soon, this will change the starting point of the tree control.

For example.

A
      B
           C
                D

->

C
      D

Replace C to start the path to the root item.
Then A, B is not visible.

What should I do?