1 |
|
conversion between number and string: replace the atoi, itoa, and etc
1
2cout<< lexical_cast< string>(i)<< endl;
cout<< lexical_cast< double>(s)<< endl;mixed types: for type generalization
1
2
3
boost::tuple<char, int, char, int> decim('-', 10, 'e', 5);
assert(stringize(decim) == "-10e5");