I
Immortal Nephi
I want to use itoa() function to convert from integer to string. I
looked at documenation. itoa() function is C sytle header like
string.h and stdlib.h. I am unable to find iostream library which itoa
() function should be built in string class like #include <string>,
but NOT #include <string.h> or #include <cstring>.
For example.
unsigned long i = 0x21ae;
string s1("integer is converted to string: ");
string s2 = itoa( i ); // ????
string s3 = s1 + s2;
cout << s3 << endl;
Output -- "integer is converted to string: 0x21ae".
looked at documenation. itoa() function is C sytle header like
string.h and stdlib.h. I am unable to find iostream library which itoa
() function should be built in string class like #include <string>,
but NOT #include <string.h> or #include <cstring>.
For example.
unsigned long i = 0x21ae;
string s1("integer is converted to string: ");
string s2 = itoa( i ); // ????
string s3 = s1 + s2;
cout << s3 << endl;
Output -- "integer is converted to string: 0x21ae".