QQ截图未命名.jpg (190.76 KB, 下载次数: 5)
下载附件
2012-10-30 17:16 上传
char* find_char(char const* str, char const* chars)
{
char* cp;
//check argument for NULL
if (str != NULL && chars != NULL)
{
//look at 'str' one character at a time
for (; *str != ' '; str ++)
{
//match with
for (cp = chars; *cp != ' '; cp ++)
{
if(*str == *cp)
return str;
}
}
}
return NULL;
}
编译不过
'=' : cannot convert from 'const char *' to 'char *'
'return' : cannot convert from 'const char *' to 'char *'
求高手
一周热门 更多>