记录详情

Compile Error

foo.cc:15:48: error: extended character “ is not valid in an identifier
   15 |         cout << fixed << setprecision(4)<< d <<“ ”<< c <<“ ”<< s << endl;
      |                                                ^
foo.cc:15:50: error: extended character ” is not valid in an identifier
   15 |         cout << fixed << setprecision(4)<< d <<“ ”<< c <<“ ”<< s << endl;
      |                                                  ^
foo.cc:15:58: error: extended character “ is not valid in an identifier
   15 |         cout << fixed << setprecision(4)<< d <<“ ”<< c <<“ ”<< s << endl;
      |                                                          ^
foo.cc:15:60: error: extended character ” is not valid in an identifier
   15 |         cout << fixed << setprecision(4)<< d <<“ ”<< c <<“ ”<< s << endl;
      |                                                            ^
foo.cc: In function 'int main()':
foo.cc:9:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
    9 |         cin << r;
      |         ~~~ ^~ ~
      |         |      |
      |         |      double
      |         std::istream {aka std::basic_istream<char>}
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/string:55,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/locale_classes.h:40,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:41,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/basic_string.h:6531:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
 6531 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/basic_string.h:6531:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:46,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/system_error:279:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)'
  279 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/system_error:279:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:513:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)'
  513 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:513:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:518:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)'
  518 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:518:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:524:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)'
  524 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:524:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:530:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)'
  530 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:530:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:535:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)'
  535 |     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:535:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:594:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)'
  594 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:594:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:829,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ostream.tcc:321:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)'
  321 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:611:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)'
  611 |     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:611:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:624:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)'
  624 |     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:624:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:629:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)'
  629 |     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:629:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
    9 |         cin << r;
      |                ^
In file included from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:750:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
  750 |     operator<<(_Ostream&& __os, const _Tp& __x)
      |     ^~~~~~~~
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:750:5: note:   template argument deduction/substitution failed:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = double]':
foo.cc:9:9:   required from here
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:750:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:79:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Resetiosflags)'
   79 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:79:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:109:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setiosflags)'
  109 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:109:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:143:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setbase)'
  143 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:143:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:178:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setfill<_CharT>)'
  178 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:178:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:208:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setprecision)'
  208 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:208:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:238:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setw)'
  238 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:238:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:311:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Put_money<_MoneyT>)'
  311 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:311:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
In file included from foo.cc:2:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:363:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Put_time<_CharT>)'
  363 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
      |     ^~~~~~~~
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/iomanip:363:5: note:   template argument deduction/substitution failed:
foo.cc:9:16: note:   'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
    9 |         cin << r;
      |                ^
foo.cc:12:14: error: 'pi' was not declared in this scope; did you mean 'p'?
   12 |         c =2*pi*r;
      |              ^~
      |              p
foo.cc:15:48: error: '\U0000201c' was not declared in this scope
   15 |         cout << fixed << setprecision(4)<< d <<“ ”<< c <<“ ”<< s << endl;
      |                                                ^
foo.cc:7:22: warning: unused variable 'p' [-Wunused-variable]
    7 |         const double p=3.14159;
      |                      ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
4 排序中的交换次数
比赛
2022暑期青少年社团(告别赛)
语言
C++
递交时间
2022-08-21 22:20:58
评测时间
2022-08-21 22:20:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes