A
Amittai Aviram
Hi! Is there a convenient way to create a null-terminated string out of an
array of type int? Is there a standard library function I can use? If so,
how? This seems elementary, but I can't seem to find the right thing -- the
only thing I can think of is using sprintf repeatedly to push a copy of the
next integer from the array onto the growing string, moving the null
terminator in the process out to the new end, until all the integers have
been converted into characters in the string (provided that I begin with
adequate memory set aside for this task). But this seems clunky and
inefficient. Thanks!
Amittai Aviram
array of type int? Is there a standard library function I can use? If so,
how? This seems elementary, but I can't seem to find the right thing -- the
only thing I can think of is using sprintf repeatedly to push a copy of the
next integer from the array onto the growing string, moving the null
terminator in the process out to the new end, until all the integers have
been converted into characters in the string (provided that I begin with
adequate memory set aside for this task). But this seems clunky and
inefficient. Thanks!
Amittai Aviram