Answers for "stringstream to string"

6

convert string to stream c++

// stringstream::str
#include <string>       // std::string
#include <iostream>     // std::cout
#include <sstream>      // std::stringstream, std::stringbuf

int main () {
  std::stringstream ss;
  ss.str ("Example string");
  std::string s = ss.str();
  std::cout << s << '\n';
  return 0;
}
Posted by: Guest on March-26-2020
1

stringstream to string

yourStringStream.str()
Posted by: Guest on April-29-2021

Code answers related to "stringstream to string"

Browse Popular Code Answers by Language