About 2,380,000 results
Open links in new tab
  1. c++ - What exactly does stringstream do? - Stack Overflow

    The istringstream type reads a string, ostringstream writes a string, and stringstream reads and writes the string. I come across some cases where it is both convenient and concise to use …

  2. c++ - How to initialize a std::stringstream? - Stack Overflow

    Feb 21, 2014 · At this point, the compiler is oblivious to the stringstream to which the result of the expression will be passed. A solution for stringstream It's a bit of a chicken-and-egg problem, …

  3. What's the difference between istringstream, ostringstream and ...

    In most cases, you won't find yourself needing both input and output on the same stringstream, so using std::ostringstream and std::istringstream explicitly makes your intention clear.

  4. How do I convert from stringstream to string in C++?

    Mar 19, 2009 · How do I convert from std::stringstream to std::string in C++? Do I need to call a method on the string stream?

  5. stringstream, string, and char* conversion confusion

    May 6, 2015 · My question can be boiled down to, where does the string returned from stringstream.str().c_str() live in memory, and why can't it be assigned to a const char*? This …

  6. How to use stringstream to separate comma separated strings

    Jul 30, 2012 · So the stringstream::>> operator can separate strings by space but not by comma. Is there anyway to modify the above code so that I can get the following result?

  7. How do you clear a stringstream variable? - Stack Overflow

    Sep 3, 2015 · Stringstream is a stream, so its iterators are forward, cannot return. In an output stringstream, you need a flush () to reinitialize it, as in any other output stream.

  8. What are the "string", "stream" and "stringstream" classes in C++?

    Nov 23, 2008 · I want to know what's the difference between string and stream in c++, and what's stringstream?

  9. c++ - Size of stringstream - Stack Overflow

    Closed 12 years ago. Is there any direct way to calculate size of internal string in stringstream? Here, str() returns a copy and then it gets the size of string.

  10. c++ - Read from string into stringstream - Stack Overflow

    Feb 4, 2014 · When I try to parse whitespace seperated double values from a string, I found this curious behaviour that the string is read out in a cyclic manner. Here's the program: …