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_18184398_20654.cpp: In member function 'bool HK::searchpath()':
0_0_18184398_20654.cpp:41:34: error: invalid conversion from 'int' to 'void*' [-fpermissive]
         memset(dx, -1, sizeof(dx));
                                  ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_18184398_20654.cpp:10:
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_18184398_20654.cpp:42:34: error: invalid conversion from 'int' to 'void*' [-fpermissive]
         memset(dy, -1, sizeof(dy));
                                  ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_18184398_20654.cpp:10:
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_18184398_20654.cpp:44:20: error: invalid types 'int[int]' for array subscript
             if(cx[i]==-1)//左边未匹配
                    ^
0_0_18184398_20654.cpp:46:25: error: invalid types 'int[int]' for array subscript
                 Q[rear++]=i;//将左边节点放入队列
                         ^
0_0_18184398_20654.cpp:47:21: error: invalid types 'int[int]' for array subscript
                 dx[i]=0;//分层 所有潜在起点构成0层
                     ^
0_0_18184398_20654.cpp:52:28: error: invalid types 'int[int]' for array subscript
             int u=Q[front++];//u都是未匹配的
                            ^
0_0_18184398_20654.cpp:53:20: error: invalid types 'int[int]' for array subscript
             if(dx[u]>dis)break;
                    ^
0_0_18184398_20654.cpp:55:26: error: invalid types 'int[int]' for array subscript
                 if(bmap[u][v]&&dy[v]==-1){//相邻未分层构成i+1层。
                          ^
0_0_18184398_20654.cpp:55:36: error: invalid types 'int[int]' for array subscript
                 if(bmap[u][v]&&dy[v]==-1){//相邻未分层构成i+1层。
                                    ^
0_0_18184398_20654.cpp:56:25: error: invalid types 'int[int]' for array subscript
                     dy[v]=dx[u]+1;//v对应的距离 为u对应距离加1
                         ^
0_0_18184398_20654.cpp:56:31: error: invalid types 'int[int]' for array subscript
                     dy[v]=dx[u]+1;//v对应的距离 为u对应距离加1
                               ^
0_0_18184398_20654.cpp:57:28: error: invalid types 'int[int]' for array subscript
                     if(cy[v]==-1)dis=dy[v];//右侧未匹配,更新最短距离
                            ^
0_0_18184398_20654.cpp:57:42: error: invalid types 'int[int]' for array subscript
                     if(cy[v]==-1)dis=dy[v];//右侧未匹配,更新最短距离
                                          ^
0_0_18184398_20654.cpp:59:32: error: invalid types 'int[int]' for array subscript
                         dx[cy[v]]=dy[v]+1;//右侧已经匹配,根据已匹配边回溯。分层
                                ^
0_0_18184398_20654.cpp:59:39: error: invalid types 'int[int]' for array subscript
                         dx[cy[v]]=dy[v]+1;//右侧已经匹配,根据已匹配边回溯。分层
                                       ^
0_0_18184398_20654.cpp:60:33: error: invalid types 'int[int]' for array subscript
                         Q[rear++]=cy[v];//左侧已匹配点入队。
                                 ^
0_0_18184398_20654.cpp:60:39: error: invalid types 'int[int]' for array subscript
                         Q[rear++]=cy[v];//左侧已匹配点入队。
                                       ^
0_0_18184398_20654.cpp: In member function 'int HK::findpath(int)':
0_0_18184398_20654.cpp:69:24: error: invalid types 'bool[int]' for array subscript
             if(!bmask[v]&&bmap[u][v]&&dy[v]==dx[u]+1){//反向搜索的过程
                        ^
0_0_18184398_20654.cpp:69:33: error: invalid types 'int[int]' for array subscript
             if(!bmask[v]&&bmap[u][v]&&dy[v]==dx[u]+1){//反向搜索的过程
                                 ^
0_0_18184398_20654.cpp:69:43: error: invalid types 'int[int]' for array subscript
             if(!bmask[v]&&bmap[u][v]&&dy[v]==dx[u]+1){//反向搜索的过程
                                           ^
0_0_18184398_20654.cpp:69:50: error: invalid types 'int[int]' for array subscript
             if(!bmask[v]&&bmap[u][v]&&dy[v]==dx[u]+1){//反向搜索的过程
                                                  ^
0_0_18184398_20654.cpp:70:24: error: invalid types 'bool[int]' for array subscript
                 bmask[v]=1;
                        ^
0_0_18184398_20654.cpp:71:24: error: invalid types 'int[int]' for array subscript
                 if(cy[v]!=-1&&dy[v]==dis)continue;
                        ^
0_0_18184398_20654.cpp:71:35: error: invalid types 'int[int]' for array subscript
                 if(cy[v]!=-1&&dy[v]==dis)continue;
                                   ^
0_0_18184398_20654.cpp:72:24: error: invalid types 'int[int]' for array subscript
                 if(cy[v]==-1||findpath(cy[v])){
                        ^
0_0_18184398_20654.cpp:72:44: error: invalid types 'int[int]' for array subscript
                 if(cy[v]==-1||findpath(cy[v])){
                                            ^
0_0_18184398_20654.cpp:73:25: error: invalid types 'int[int]' for array subscript
                     cy[v]=u;
                         ^
0_0_18184398_20654.cpp:74:25: error: invalid types 'int[int]' for array subscript
                     cx[u]=v;
                         ^
0_0_18184398_20654.cpp: In member function 'int HK::Max_match()':
0_0_18184398_20654.cpp:83:32: error: invalid conversion from 'int' to 'void*' [-fpermissive]
         memset(cx,-1,sizeof(cx));
                                ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_18184398_20654.cpp:10:
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_18184398_20654.cpp:84:32: error: invalid conversion from 'int' to 'void*' [-fpermissive]
         memset(cy,-1,sizeof(cy));
                                ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_18184398_20654.cpp:10:
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_18184398_20654.cpp:86:43: error: cannot convert 'bool' to 'void*' for argument '1' to 'void* memset(void*, int, size_t)'
             memset(bmask, 0, sizeof(bmask));
                                           ^
0_0_18184398_20654.cpp:88:24: error: invalid types 'int[int]' for array subscript
                 if(cx[i]==-1){
                        ^
0_0_18184398_20654.cpp: In function 'void input()':
0_0_18184398_20654.cpp:112:22: error: invalid types 'int[int]' for array subscript
             X[++hk.nx]=i;
                      ^
0_0_18184398_20654.cpp:115:22: error: invalid types 'int[int]' for array subscript
             Y[++hk.ny]=i;
                      ^
0_0_18184398_20654.cpp:117:10: error: no match for 'operator[]' (operand types are 'P' and 'int')
         P[i].like=x;
          ^
0_0_18184398_20654.cpp:118:22: error: no match for 'operator[]' (operand types are 'P' and 'int')
         scanf("%d",&P[i].disnum);
                      ^
0_0_18184398_20654.cpp:119:24: error: no match for 'operator[]' (operand types are 'P' and 'int')
         for(int j=0;j<P[i].disnum;j++){
                        ^
0_0_18184398_20654.cpp:120:26: error: no match for 'operator[]' (operand types are 'P' and 'int')
             scanf("%d",&P[i].dis[j]);
                          ^
0_0_18184398_20654.cpp:125:22: error: invalid types 'int[int]' for array subscript
             int L=X[i],R=Y[j];
                      ^
0_0_18184398_20654.cpp:126:29: error: 'R' was not declared in this scope
             for(int k=0;k<P[R].disnum;k++){
                             ^
0_0_18184398_20654.cpp:127:21: error: no match for 'operator[]' (operand types are 'P' and 'int')
                 if(P[L].like==P[R].dis[k]){
                     ^
0_0_18184398_20654.cpp:128:27: error: invalid types 'int[int]' for array subscript
                     bmap[i][j]=1;break;
                           ^
0_0_18184398_20654.cpp:131:23: error: invalid types 'int[int]' for array subscript
             if(!bmap[i][j]){
                       ^
0_0_18184398_20654.cpp:132:32: error: no match for 'operator[]' (operand types are 'P' and 'int')
                 for(int k=0;k<P[L].disnum;k++){
                                ^
0_0_18184398_20654.cpp:133:26: error: 'R' was not declared in this scope
                     if(P[R].like==P[L].dis[k]){
                          ^
0_0_18184398_20654.cpp:133:36: error: no match for 'operator[]' (operand types are 'P' and 'int')
                     if(P[R].like==P[L].dis[k]){
                                    ^
0_0_18184398_20654.cpp:134:31: error: invalid types 'int[int]' for array subscript
                         bmap[i][j]=1;break;
                               ^
0_0_18184398_20654.cpp: In function 'bool findY(int)':
0_0_18184398_20654.cpp:149:27: error: invalid types 'int[int]' for array subscr


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-27 01:26:16, Gzip enabled