#include <iostream>
#include <map>
#include <string.h>

using namespace std;

int main()
{
	struct mypred {
		bool operator()(const char* a, const char *b) {
			return strcmp(a, b) < 0;
		}
	};
    std::map<const char *, int, mypred> m;

    const char *j = "key";
    m.insert(std::make_pair(j, 5));

    char *l = (char *)malloc(strlen(j)+1);
    strcpy(l, j);

    printf("%s\n", "key");
    printf("%s\n", j);
    printf("%s\n", l);

    // Check if key in map -> 0 if it is, 1 if it's not
    printf("%d\n", m.find("key") == m.end());
    printf("%d\n", m.find(j) == m.end());
    printf("%d\n", m.find(l) == m.end());
}
