问题描述
我在使用cout和__float128时遇到问题。
代码是:
__float128 su1 = 0.33333333333333333q;
cout << "1 / 3 = " << su1 << endl;
而来自g ++(GCC)9.3.0的错误是:
g++ -std=gnu++17 -Wall -g -c -o third.o third.cc
third.cc: In function ‘int main()’:
third.cc:41:55: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘__float128’)
41 | cout << "1 / 3 = " << su1 << endl;
| ~~~~~~~~~~~~~~~~~~ ^~ ~~~~~
| | |
| | __float128
| std::basic_ostream<char>
In file included from /lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/iostream:39,from third.cc:9:
对错误有任何想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)