记录详情

Compile Error

/in/foo.c:4:1: error: unknown type name 'viod'; did you mean 'void'?
 viod main()
 ^~~~
 void
/in/foo.c: In function 'main':
/in/foo.c:6:12: error: 'N' undeclared (first use in this function)
  char str1[N],str2[10];
            ^
/in/foo.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:10: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[10]' [-Wformat=]
  scanf("%s\n",&str2);
         ~^    ~~~~~
/in/foo.c:9:9: warning: missing terminating " character
  printf("n=%d',strcount(str1,str2));
         ^
/in/foo.c:9:9: error: missing terminating " character
  printf("n=%d',strcount(str1,str2));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:11:1: error: expected expression before '}' token
 }
 ^
/in/foo.c:11:1: error: expected ';' before '}' token
/in/foo.c:6:7: warning: unused variable 'str1' [-Wunused-variable]
  char str1[N],str2[10];
       ^~~~
/in/foo.c: In function 'strcount':
/in/foo.c:21:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    if(*(p+i)=*(q=i))
                 ^
/in/foo.c:21:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    if(*(p+i)=*(q=i))
       ^

信息

递交者
类型
自测
题目
3-6 查找资料
语言
C
递交时间
2018-12-08 10:15:36
评测时间
2018-12-08 10:16:02
评测机
分数
0
总耗时
16ms
峰值内存
3.164 MiB