Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<cassert>
 
struct Meirei{
    std::string mei;
    std::string str;
};

struct Node{
	Node(){
		umu=false;
		a=NULL;
		c=NULL;
		g=NULL;
		t=NULL;
	}
	bool umu;
	Node* a;
	Node* c;
	Node* g;
	Node* t;
};

class Tree
{
public:
	Tree(){
		m_root=new Node();
	}
	void insert(std::string moji);
	bool find(std::string moji);
	
private:
	Node* m_root;
};

void Tree::insert(std::string moji)
{
	Node* node = m_root;
	for(int i =0; i < moji.size(); i++){
		if(moji[i]=='A'){
			if(node->a == NULL){
				node->a = new Node();
			}
			node = node->a;
		}else if(moji[i]=='C'){
			if(node->c == NULL){
				node->c =  new Node();
			}
			node = node->c;
		}else if(moji[i]=='G'){
			if(node->g == NULL){
				node->g = new Node();
			}
			node = node->g;
		}else if(moji[i]=='T'){
			if(node->t == NULL){
				node->t = new Node();
			}
			node = node->t;
		}else {
			assert(true);
		}
	}
	node->umu=true;
}
//---------------------------------
bool Tree::find(std::string moji)
{
	Node* node = m_root;
	for(int i =0; i < moji.size(); i++){
		if(moji[i]=='A'){
			if(node->a == NULL){
				return false;
			}
			node = node->a;
		}else if(moji[i]=='C'){
			if(node->c == NULL){
				return false;
			}
			node = node->c;
		}else if(moji[i]=='G'){
			if(node->g == NULL){
				return false;
			}
			node = node->g;
		}else if(moji[i]=='T'){
			if(node->t == NULL){
				return false;
			}
			node = node->t;
		}else {
			assert(true);
		}
	}
	if(node->umu){
		return true;
	}
	return false;
}



//typedef std::vector<MEIREI> VecMeirei;
//typedef std::vector<std::string> WORDS;
//typedef std::vector<bool> ARINASHI;
//void input();
//bool find(WORDS jisho, std::string str);
void output(bool result);
//-------------------------------------------------------------------
int main()
{
    long n;
    std::cin >> n;
    Tree* tree = new Tree();
	for(int i=0; i<n; i++){
		std::string meirei;
	    std::cin >> meirei;
		std::string moji;
		std::cin >> moji;
		if(meirei=="insert"){
		    tree->insert(moji);
	    }else if(meirei=="find"){
	     	output(find(moji));
	    }
	}
    return 0;
}
//-------------------------------------------------------------------
void output(bool result)
{
    if(result){
        std::cout << "yes" << std::endl;
    }else{
        std::cout << "no" << std::endl;
    }
    return;
}
//-------------------------------------------------------------------

Compiler output:
a.cc: In function 'int main()':
a.cc:126:28: error: no matching function for call to 'find(std::string&)'
  126 |                 output(find(moji));
      |                        ~~~~^~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   candidate expects 3 arguments, 1 provided