I want to convert the text string from a file into binary and then create a new file holding these binary. I am using the VC++ 2008.

I have done some search on the internet, but hardly understand.
Can anyone give me idea or sample code with explanation?

Thanks in advance!

what do you mean you want to convert it to binary? Like the letter A (which has a decimal value of 65) = 1000001?

yes, convert it to binary.

Thanks for link!

Do you know how to convert an integer to binary (characters are really integers). If you don't, then google and you will find out how. Once you have a function that does that then you should be able to convert all the characters in a file to binary.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.