babu198649
10th February 2009, 07:28
Hi
The following code gives error.
QHash<float,int> hash;
hash.insert(-1.5,1);
/usr/local/Trolltech/Qt-4.4.2/include/QtCore/qhash.h:838: error: call of overloaded `qHash(const float&)' is ambiguous
Where as if i use QMap instead of QHash such as
QMap<float,int> mmap;
mmap.insert(-1.5,1);
then the code works fine.
The following code gives error.
QHash<float,int> hash;
hash.insert(-1.5,1);
/usr/local/Trolltech/Qt-4.4.2/include/QtCore/qhash.h:838: error: call of overloaded `qHash(const float&)' is ambiguous
Where as if i use QMap instead of QHash such as
QMap<float,int> mmap;
mmap.insert(-1.5,1);
then the code works fine.