问题描述
我正在尝试使用操纵器很好地输出CryptoPP::Integer
类型的值。我的小测试如下:
#include <iomanip>
#include <iostream>
#include <crypto++/integer.h>
int main()
{
std::cout << "int,aligned to the right : " << std::setw(6) << std::right << int(100) << std::endl;
std::cout << "CryptoPP::Integer,aligned to the right: " << std::setw(6) << std::right << CryptoPP::Integer(100) << std::endl;
std::cout << "int,aligned to the left : " << std::setw(6) << std::left << int(100) << std::endl;
std::cout << "CryptoPP::Integer,aligned to the left : " << std::setw(6) << std::left << CryptoPP::Integer(100) << std::endl;
}
结果如下:
int,aligned to the right : 100
CryptoPP::Integer,aligned to the right: 100.
int,aligned to the left : 100
CryptoPP::Integer,aligned to the left : 1 00.
因此,CryptoPP::Integer
值向右对齐无法正常工作,向左对齐将值分为两部分。最后还有.
吗?
(crypto ++版本-5.6.4-8)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)