index好像是关键字
by Eziotao @ 2018-07-26 16:08:21
洛谷在线IDE:
```
/tmp/tmpSM3eqx.cpp:7:60: error: 'int index' redeclared as different kind of symbol
int dfn[maxn],s[maxn],n,m,low[maxn],head[maxn],ans,a[maxn],index,t,tot,cnt,vis[maxn];
^
In file included from /tmp/runtime/include/c++/4.9.4/cstring:42:0,
from /tmp/runtime/include/c++/4.9.4/x86_64-unknown-linux-gnu/bits/stdc++.h:48,
from /tmp/tmpSM3eqx.cpp:1:
/tmp/runtime/include/string.h:478:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^
/tmp/tmpSM3eqx.cpp: In function 'void tarjan(int)':
/tmp/tmpSM3eqx.cpp:18:9: error: no pre-increment operator for type
s[++index]=now;
^
/tmp/tmpSM3eqx.cpp:34:20: error: no post-decrement operator for type
vis[s[index--]]=false;
^
/tmp/tmpSM3eqx.cpp:37:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
}while(now!=s[index+1]);
^
```
by xiangling @ 2018-07-26 16:15:36
index是关键字
@[l_water](/space/show?uid=51164)
by interestingLSY @ 2018-07-26 16:15:50
@[Eziotao](/space/show?uid=70280) 感谢大佬
by l_water @ 2018-07-26 18:19:47
@[rainman](/space/show?uid=55804) 大佬混眼熟,偶遇++,嘻嘻
by l_water @ 2018-07-26 18:20:07
@[interestingLSY](/space/show?uid=25630) 谢啦大佬
by l_water @ 2018-07-26 18:20:20