小编mik*_*ike的帖子

这个功能有什么作用?

int mystery( const char *s1, const char *s2 ) {
  for( ; *s1 != '\0' && *s2 != '\0'; s1++, s2++ ) {
    if( *s1 != *s2 ) {
      return 0;
    } //end if
  } //end for
  return 1;
}
Run Code Online (Sandbox Code Playgroud)

我知道它有输入错误,但这正是它的原因.谢谢你们,我需要它也运行,我已经添加了变量声明,但我得到编译器错误说

在功能上,'或';' 在'{'之前`int main()':
error: a function-definition is not allowed here before '{' token
error: expected

c pointers loops

4
推荐指数
1
解决办法
674
查看次数

标签 统计

c ×1

loops ×1

pointers ×1