Hello all, is there simple way to check if a multimap contains a value, or am I going to have to loop through all pairs?

Is this what you're looking for?

#include <iostream>
#include <map>

int main(int argc, char *argv[])
	std::multimap <int, double> MyMap;
	//create a mapping from "testone" to 111
	MyMap.insert(std::pair<int, double>(1, 1.2));
	//create an iterator
	std::map<int, double>::iterator iter;

	iter = MyMap.find(1);
    if(iter == MyMap.end())
      std::cout << "Not found." << std::endl;
	std::cout << "Found: " << iter->second << std::endl;	
	return 0;


commented: Just the info I needed +2

Yes, thank you, that is what I was looking for. It's strange, the documentation I was reading said that find looked for the value, but the example showed that it would search for the key, so I was slightly unsure.

solved, thanks