- Code: Select all
std::stringstream istr(std::string("test"));
std::stringstream ostr;
std::stringstream mstr;
// trying to encode
Base64Encoder encoder(ostr);
StreamCopier::copyStream(istr, encoder);
// here we will see "dGVz"
std::cout << ostr.str() << std::endl;
// trying to decode
Base64Decoder decoder(ostr);
StreamCopier::copyStream(decoder, mstr);
// and now we see: "tes"
std::cout << mstr.str() << std::endl;
Is this is a bug or incorrect use of ?
Thanks





