PDA

View Full Version : Replacement for CMapStringToPtr



rajeshs
21st December 2007, 11:41
Hi all,

what is the replacement for CMapStringToPtr in qt to store maps of void pointers ?

high_flyer
21st December 2007, 12:05
What is exactly that you want to implement?
In what way QMap does not answer your needs?

wysota
21st December 2007, 12:09
Let's see... We have a class that has a name "C"-"Map"-"String"-"To"-"Pointer". After accessing assistant and typing in "Map" you'll see QMap that is a template class that takes two parameters. First one is the key type and the other the value type, so without having any knowledge of Qt you might deduce a QMap<String,Pointer> combination and with a bit of knowledge of C++ and Qt you'd turn it into QMap<QString,void*>.

If you have any other similar doubts, please conduct a process such as described above before asking such questions.

rajeshs
21st December 2007, 12:25
sorry , here onwards i will definitly follow your way,

I was thinking before exact matching is there in Qt.