, int , ascii , int .
, , 10 ,
// create temporary string to hold each element
char intAsString[10 + 1];
sprintf(intAsString, "%d", v[0]);
itoa( v[0], intAsString, 10 );
ostringstream <
if you look at the contents of the memory intAsString and v [0], they are very different from each other, the first ones contain the letters ascii, which represent the value v [0] in the decimal number system (base 10), and v [0] contains the binary representation of the number (because how computers store numbers).
source
share