Language: C++

#include<iostream>
#include<string>
using namespace std;

const int MAX = 1000000;

int strToInt(char mes[]) {
	long long key;
	key = 0;
	for (int i = 0; i < strlen(mes); i++) {
		if (mes[i] == 'A') {
			key += 1;
		}
		else if (mes[i] == 'C') {
			key += 2;
		}
		else if (mes[i] ==  'G') {
			key += 3;
		}
		else if (mes[i] == 'T') {
			key += 4;
		}
		else {
			return 0;
		}
		key = key << 1;
	}
	return key;
}

int h1(int key) {
	return key % MAX;
}

int h2(int key) {
	return 1 + (key % (MAX - 1));
}

void insertHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
//		if (dic[h] == message) {
		if (strcmp(dic[h].c_str(), message)) {
			return; //?????????????????§?????\??£???????????????????????????
		}
		else if (strlen(dic[h].c_str()) == 0) {
			dic[h] = message;
			return;
		}
		else {
			i++;
		}
	}
}

bool findHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
		if (strcmp(dic[h].c_str(), message)) {
			return true;
		}
		else if (strlen(dic[h].c_str()) == 0) {
			return false; //\0??¨???????????¨???????????????????????????????????????,
								 //??????????????£??????????????§????????????????????\??£???????????????
		}
		else {
			i++;
		}
	}
	return false;
}

void dumpList(string answer[], int num) {
	for (int i = 0; i < num; i++) {
		printf("%s\n", answer[i].c_str());
	}
}
int main() {
	//	const int MAX = 1000000+1;
	string dictionary[MAX];
//	string answer[MAX];
	int num;
//	int dicMaxPoint;
	int ansMaxPoint;
//	dicMaxPoint = 0;
	ansMaxPoint = 0;
	for (int i = 0; i < MAX; i++) {
		dictionary[i] = "\0";
	}
//	cin >> num;
	scanf("%d", &num);

	for (int i = 0; i < num; i++) {
		string command;
		string message;
		char com[12];
		char mes[12];
		//cin >> command;
		//cin >> message;
		scanf("%s", com);
		scanf("%s", mes);
//		command = com;
//		message = mes;
		if (com[0] == 'i') {
			insertHash(dictionary, mes);
		}
		else {
			if (findHash(dictionary, mes)) {
//				answer[ansMaxPoint++] = "yes";
				printf("yes\n");
			}
			else {
//				answer[ansMaxPoint++] = "no";
				printf("no\n");
			}
		}
	}

//	dumpList(answer, ansMaxPoint);
	return 0;
}

Compiler output:
a.cc: In function 'int strToInt(char*)':
a.cc:10:29: error: 'strlen' was not declared in this scope
   10 |         for (int i = 0; i < strlen(mes); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc: In function 'void insertHash(std::string*, char*)':
a.cc:46:21: error: 'strcmp' was not declared in this scope
   46 |                 if (strcmp(dic[h].c_str(), message)) {
      |                     ^~~~~~
a.cc:46:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:49:26: error: 'strlen' was not declared in this scope
   49 |                 else if (strlen(dic[h].c_str()) == 0) {
      |                          ^~~~~~
a.cc:49:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'bool findHash(std::string*, char*)':
a.cc:65:21: error: 'strcmp' was not declared in this scope
   65 |                 if (strcmp(dic[h].c_str(), message)) {
      |                     ^~~~~~
a.cc:65:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:68:26: error: 'strlen' was not declared in this scope
   68 |                 else if (strlen(dic[h].c_str()) == 0) {
      |                          ^~~~~~
a.cc:68:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'