Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:6:13: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' and 'int')
  cin>>b1>>a1<<b2>>a2;
  ~~~~~~~~~~~^~~~
/in/foo.cc:6:13: note: candidate: operator<<(int, int) <built-in>
/in/foo.cc:6:13: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'int'
In file included from /usr/include/c++/6/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/regex.h:1483:5: note: candidate: template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::sub_match<_Bi_iter>&)
     operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/regex.h:1483:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:3160:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::piecewise_linear_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:3160:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:2944:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::piecewise_constant_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:2944:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:2734:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::discrete_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:2734:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:2275:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::student_t_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:2275:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:2200:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::fisher_f_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:2200:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:2036:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::chi_squared_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:2036:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:1963:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::lognormal_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:1963:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:1667:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::binomial_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:1667:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15: note:   'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  cin>>b1>>a1<<b2>>a2;
               ^~
In file included from /usr/include/c++/6/random:51:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:108,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/random.tcc:1400:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::poisson_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
/usr/include/c++/6/bits/random.tcc:1400:5: note:   template argument deduction/substitution failed:
/in/foo.cc:6:15

信息

递交者
类型
递交
题目
P1063 A6-2 最大公约数专题:分数的加法
语言
C++
递交时间
2024-11-22 07:14:41
评测时间
2024-11-22 07:14:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes