1

What are the factors to choose between std::stringstream and std::string? (or any other string streams e.g. istringstream, ostringstream)

If concatenation is the only usage, does it make any difference?

std::stringstream strm;
strm << "A";     
strm << "B";
strm << "C";
strm << "THE "
        "REST";        

std::string str;
str  = "A";
str += "B";
str += "D";
str += "E";
str += "THE "
       "REST";
pmoubed
  • 3,842
  • 10
  • 37
  • 60

0 Answers0