Insider Asked:2020-06-15 19:38:38 +0000 UTC2020-06-15 19:38:38 +0000 UTC 2020-06-15 19:38:38 +0000 UTC 如何加入两个或多个 std::stringstream 772 是否可以将两个和/或多个 std::stringstream 写入一个? 相似: std::stringstream a; std::stringstream b; std::stringstream c; a << b << c; c++ 1 个回答 Voted Best Answer Alex Titov 2020-06-16T00:41:35Z2020-06-16T00:41:35Z 从一个流到另一个流没有 << 运算符...但定义了标准流缓冲区写入运算符,即 a << b.rdbuf() << c.rdbuf(); 应该适用于任何管道。好吧,对于特定std::stringstream用途的第一条评论中的代码,它看起来更清晰。
从一个流到另一个流没有 << 运算符...但定义了标准流缓冲区写入运算符,即
应该适用于任何管道。好吧,对于特定
std::stringstream
用途的第一条评论中的代码,它看起来更清晰。