gpt4 book ai didi

c++ - 没有已定义函数的匹配函数

转载 作者:行者123 更新时间:2023-11-27 23:04:24 24 4
gpt4 key购买 nike

<分区>

我有一段代码,由于错误而无法编译,在 if (asd( checkline[i], alphabet)==true).我不知道我做错了什么,因为 asd() 是在 exname() 之前定义的。提前感谢您的帮助。

#include <string>
#include <iostream>
const std::string alphabet="йцукенгшщзхъфывапролджэёячсмитьбю";
using namespace std;

bool asd(string two, string one)
{
size_t pos=one.find(two);
if(pos!= string::npos)
{
return true;
}
return false;
}

string exname(string checkline)
{
string newstr;

for (int i = 0; i < checkline.length(); ++i)
{
if (asd( checkline[i], alphabet)==true)
{
/* code */
}
}
return newstr;
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com