binary to string conversion and vice versa

please let me know that in unix using c programming language we can do binary to string conversion and vice versa using ltoa and atol but how can we do it in c++ programming language.
thank you in advance.

itoa and atoi do integer to string and vice versa conversions... these are available in ANSI C/C++ library stdlib.h

Cheers!
Vishnu.

strtol() can be used to convert from string to binary, ANSCI C again.
For the case of vice versa, how are you going to store binary data types? C does not offer separate data type for this, so an ntegral type would be fine to store binary data, and to convert it into string, you can use sprintf().

Vishnu, itoa() is not ANSI C standard. It's only a function supported by many compilers.

nice catch hell666!

I remember long ago seeing atoi in stdlib... and wrongly clubbed both atoi and itoa as belonging to stdlib... now I confirm that only atoi is ensured by ANSI C and present in stdlb...

Thanks again!

Cheers!
Vishnu.