/ Vijos /

记录详情

Compile Error

foo.cpp:35:1: error: reference to 'vector' is ambiguous
 vector m[MAX];
 ^
foo.cpp:9:8: note: candidates are: struct vector
 struct vector {
        ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\vector:64:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\random.h:34,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:50,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_vector.h:210:11: note:                 template<class _Tp, class _Alloc> class std::vector
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^
foo.cpp:35:1: error: 'vector' does not name a type
 vector m[MAX];
 ^
foo.cpp: In function 'void dfs(int)':
foo.cpp:61:7: error: reference to 'vector' is ambiguous
  for (vector* it = m[x].next; it; it = it->next) {
       ^
foo.cpp:9:8: note: candidates are: struct vector
 struct vector {
        ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\vector:64:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\random.h:34,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:50,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_vector.h:210:11: note:                 template<class _Tp, class _Alloc> class std::vector
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^
foo.cpp:61:15: error: 'it' was not declared in this scope
  for (vector* it = m[x].next; it; it = it->next) {
               ^
foo.cpp:61:20: error: 'm' was not declared in this scope
  for (vector* it = m[x].next; it; it = it->next) {
                    ^
foo.cpp: In function 'void dfs2(int)':
foo.cpp:103:7: error: reference to 'vector' is ambiguous
  for (vector* it = m[x].next; it; it = it->next) {
       ^
foo.cpp:9:8: note: candidates are: struct vector
 struct vector {
        ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\vector:64:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\random.h:34,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:50,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_vector.h:210:11: note:                 template<class _Tp, class _Alloc> class std::vector
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^
foo.cpp:103:15: error: 'it' was not declared in this scope
  for (vector* it = m[x].next; it; it = it->next) {
               ^
foo.cpp:103:20: error: 'm' was not declared in this scope
  for (vector* it = m[x].next; it; it = it->next) {
                    ^
foo.cpp: In function 'void Initalize()':
foo.cpp:160:3: error: 'm' was not declared in this scope
   m[u].push_back(v, c);
   ^

信息

递交者
类型
递交
题目
P1983 运输计划
语言
C++
递交时间
2016-11-13 21:16:44
评测时间
2016-11-13 21:16:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes