Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

String Appending in C++

#include <sstream>
// ...

std::stringstream ss;

//put arbitrary formatted data into the stream
ss << 4.5 << ", " << 4 << " whatever";

//convert the stream buffer into a string
std::string str = ss.str();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #String #Appending
ADD COMMENT
Topic
Name
1+6 =