/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:6:14: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' and '<unresolved overloaded function type>')
     cin>>x>>y>>endl;
              ^
foo.cpp:6:14: note: candidates are:
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:40:0,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:120:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]
       operator>>(__istream_type& (*__pf)(__istream_type&))
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:120:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&) {aka std::basic_istream<char>& (*)(std::basic_istream<char>&)}'
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:124:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]
       operator>>(__ios_type& (*__pf)(__ios_type&))
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:124:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}'
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:131:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]
       operator>>(ios_base& (*__pf)(ios_base&))
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:131:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:168:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]
       operator>>(bool& __n)
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:168:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&'
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:172:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]
       operator>>(short& __n);
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:172:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&'
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:175:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]
       operator>>(unsigned short& __n)
       ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\istream:175:7: note:   no known conversion for argument 1 from '<unresolved

信息

递交者
类型
递交
题目
P1000 A+B Problem
语言
C++
递交时间
2014-07-15 18:05:14
评测时间
2014-07-15 18:06:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes