/ * And C conversion functions are more concealed compared to usage, and it is not intuitive for beginners. * /
#include "iostream" #include "sstream" #include "string" #include "cstdlib", "#include" cstdlib "," #include "cstdlib", "ininclud; int main (void) {/ * The following is a built-in type to String conversion solution * / int tent; char cval; ostringstream out_string; string str; ival = 100; cval = 'w'; out_string << ival << "<< cval; str = out_string.str (); cout << str << end1
/ * The following is a String solution to built-in type conversion * / int itmpe; char ctmpe; str = "100k"; istringstream in_string (str); in_string >> itmpe >> ctmpe; cout << itmpe << "<< CTMPE << Endl; System ("pause"); return 0;}