M
Manuel Maria Diaz Gomez
Hi everybody,
This should be trivial, but I just can't see it.
The following statement in a method doesn't work for me:
(there's only one entry in myMap)
map<const char*, int>::const_iterator it = myMap.find(key);
where key is a const char* passed by the class method.
However, if I do:
map<const char*, int>::const_iterator it = registry.begin();
Then the iterator points to the right value, and (*it).first displays the
right key.
I have checked the key value being passed to find() and is correct, so that
shouldn't be a problem...
Any hints?
Cheers
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================
This should be trivial, but I just can't see it.
The following statement in a method doesn't work for me:
(there's only one entry in myMap)
map<const char*, int>::const_iterator it = myMap.find(key);
where key is a const char* passed by the class method.
However, if I do:
map<const char*, int>::const_iterator it = registry.begin();
Then the iterator points to the right value, and (*it).first displays the
right key.
I have checked the key value being passed to find() and is correct, so that
shouldn't be a problem...
Any hints?
Cheers
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================