concatenate stringstream in c++

后端 未结 6 456
没有蜡笔的小新
没有蜡笔的小新 2021-01-17 16:20

How can I concatenate two stringstreams?

#include 
#include 
#include 
#include 
#include <         


        
6条回答
  •  醉梦人生
    2021-01-17 17:00

    Or

    a << b.rdbuf();
    

    provided that get pointer is on the beginning of the stream to avoid allocating yet another std::string for content.

提交回复
热议问题