Why doesn't this compile? I am trying to use multimap and am unsuccessful.
#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
multimap<string,long> test;
string a="BLAH";
long b=8;
pair<string,long> c( a, b );
test.insert( c );
return 0;
}
CC Test.cpp -o Test
"Test.cpp", line 11: Error: Could not find a match for std::multimap<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, long, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char>>, long>>>::insert(std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, long>).
1 Error(s) detected.