F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_30068674_16423.cpp:4:15: error: conflicting declaration 'char a [1000005]'
 char a[1000005],b[15];
               ^
0_0_30068674_16423.cpp:3:5: note: previous declaration as 'int a'
 int a,count1,count2,count3,x1,x2;
     ^
0_0_30068674_16423.cpp: In function 'int main()':
0_0_30068674_16423.cpp:7:17: error: 't' was not declared in this scope
     scanf("%d",&t); 
                 ^
0_0_30068674_16423.cpp:10:29: error: invalid conversion from 'int' to 'void*' [-fpermissive]
         memset(a,0,sizeof(a));
                             ^
In file included from 0_0_30068674_16423.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:43:18: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
   void * __cdecl memset(void *_Dst,int _Val,size_t _Size);
                  ^
0_0_30068674_16423.cpp:15:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
         x1=strlen(a);
                    ^
In file included from 0_0_30068674_16423.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:54:18: note: initializing argument 1 of 'size_t strlen(const char*)'
   size_t __cdecl strlen(const char *_Str);
                  ^
0_0_30068674_16423.cpp:21:28: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
             count3=strstr(a+temp,b)-a-temp;
                            ^
In file included from 0_0_30068674_16423.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:86:31: note: initializing argument 1 of 'char* strstr(const char*, const char*)'
   _CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
                               ^
0_0_30068674_16423.cpp:21:38: error: invalid conversion from 'char*' to 'int' [-fpermissive]
             count3=strstr(a+temp,b)-a-temp;
                                      ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 15:20:51, Gzip enabled