开发者

Any way to cout in base64?

开发者 https://www.devze.com 2023-02-07 07:51 出处:网络
I know I could use itoa to create a base64 string, just wondered if there 开发者_如何学编程was an easy way to cout a number in base64 the same way cout << hex sets a flag to display integral val

I know I could use itoa to create a base64 string, just wondered if there 开发者_如何学编程was an easy way to cout a number in base64 the same way cout << hex sets a flag to display integral values in hex...


There isn't a built-in way (setbase only accepts 8, 10, 16 as parameters). You'll have to write your own stream manipulator.


It's an old code but valid xstreambuf

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号