/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void recu(float, int)':
foo.cpp:11:13: error: reference to 'min' is ambiguous
   if (Sst < min)
             ^
foo.cpp:3:5: note: candidates are: int min
 int min;
     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:239:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:193:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
foo.cpp:12:4: error: reference to 'min' is ambiguous
    min = Sst;
    ^
foo.cpp:3:5: note: candidates are: int min
 int min;
     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:239:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:193:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
foo.cpp: In function 'int main()':
foo.cpp:39:2: error: reference to 'min' is ambiguous
  min = 100;
  ^
foo.cpp:3:5: note: candidates are: int min
 int min;
     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:239:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:193:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
foo.cpp:45:10: error: reference to 'min' is ambiguous
  cout << min<<endl;
          ^
foo.cpp:3:5: note: candidates are: int min
 int min;
     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:239:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:193:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
foo.cpp:46:16: error: 'system' was not declared in this sco

信息

递交者
类型
递交
题目
P1002 过河
语言
C++
递交时间
2014-02-03 18:25:56
评测时间
2014-02-03 18:25:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes