I am using QHash
in C++ to store some simple key and value pairs. In my case the key is an integer, so is the value. To add a new key/value pair to the hash, this is my syntax:
QHash<int, int> myhash;
int key = 5;
int value = 87;
myhash.insert(key,value);
qDebug() << "key 5 value = " << myhash.value(5); // outputs 87
How can I update an existing key-value par? What is the syntax?