1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
| $ g++ main.cpp
main.cpp:9:9: error: no match for operator<< (operand types are double and std::_Setprecision)
cout<<setprecision(4)<<cout<<endl;
~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/string:52,
from /usr/include/c++/8/bits/locale_classes.h:40,
from /usr/include/c++/8/bits/ios_base.h:41,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/bits/basic_string.h:6314: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>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^~~~~~~~
/usr/include/c++/8/bits/basic_string.h:6314:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/bits/ios_base.h:46,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/system_error:217:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
^~~~~~~~
/usr/include/c++/8/system_error:217:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:497:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^~~~~~~~
/usr/include/c++/8/ostream:497:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:502:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^~~~~~~~
/usr/include/c++/8/ostream:502:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:508:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^~~~~~~~
/usr/include/c++/8/ostream:508:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:514:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^~~~~~~~
/usr/include/c++/8/ostream:514:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:519:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
^~~~~~~~
/usr/include/c++/8/ostream:519:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:539:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
^~~~~~~~
/usr/include/c++/8/ostream:539:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/ostream:693,
from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/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*)
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
^~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:556:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:556:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:569:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:569:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:574:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:574:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<char, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from /usr/include/c++/8/iostream:39,
from main.cpp:1:
/usr/include/c++/8/ostream:682:5: note: candidate: template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)
operator<<(_Ostream&& __os, const _Tp& __x)
^~~~~~~~
/usr/include/c++/8/ostream:682:5: note: template argument deduction/substitution failed:
/usr/include/c++/8/ostream: In substitution of template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = double&; _Tp = std::_Setprecision]:
main.cpp:9:25: required from here
/usr/include/c++/8/ostream:682:5: error: no type named type in struct std::enable_if<false, void>
In file included from main.cpp:2:
/usr/include/c++/8/iomanip:79:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Resetiosflags)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
^~~~~~~~
/usr/include/c++/8/iomanip:79:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/iomanip:109:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setiosflags)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
^~~~~~~~
/usr/include/c++/8/iomanip:109:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/iomanip:143:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setbase)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
^~~~~~~~
/usr/include/c++/8/iomanip:143:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/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>)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
^~~~~~~~
/usr/include/c++/8/iomanip:178:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/iomanip:208:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setprecision)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
^~~~~~~~
/usr/include/c++/8/iomanip:208:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/iomanip:238:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setw)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
^~~~~~~~
/usr/include/c++/8/iomanip:238:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/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>)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
^~~~~~~~
/usr/include/c++/8/iomanip:311:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl;
^
In file included from main.cpp:2:
/usr/include/c++/8/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>)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
^~~~~~~~
/usr/include/c++/8/iomanip:363:5: note: template argument deduction/substitution failed:
main.cpp:9:25: note: mismatched types std::basic_ostream<_CharT, _Traits> and double
cout<<setprecision(4)<<cout<<endl; |
Partager