#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <sstream>
int main() {
std::map< std::vector<std::string>, int> m;
m[{"hello","world"}]=1;
m[{"momma"}]=2;
m[{"a","b"}]=3;
m[{"momma","zz"}]=4;
m[{"zz","momma","b"}]=5;
m[{"zz","momma","a"}]=6;
for(auto &[k,v]: m)
{
std::ostringstream strm;
for(auto &kv: k)
strm << ((&kv == &*k.begin())?"[":",") << kv;
strm << "]";
fprintf(stderr,"k.size %ld, k %s, v %d\n", k.size(), strm.str().c_str(), v);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: