在一个函数中,我正在传递 ostream 并希望转换为字符串。
void func (ostream& stream) { /* Needs to convert stream into string */ }
c++ string iostream function ostream
c++ ×1
function ×1
iostream ×1
ostream ×1
string ×1