How to convert strings to bitstream?

I'm sorry, I tossed out my crystal ball years ago. You'll have to be more specific instead of expecting us to read your mind. As given, your question is ambiguous.

I just mean to say that I have some string and I want to convert it in a stream of bits.
Is there any function availaible in C++ which can do that. e,g
str = "A";
is represented as 1010 in bits .

Hope now you get me :o)

There is a function in C++ that does what you want. But it might not have been written for you. So you're going to have to write it yourself.

You should also try figuring out _exactly_ what you are trying to do. Right now, you are being ambiguous. After all, a string is already a stream of bits! Also, your example of converting "A" to 1010 makes no sense to me at all. Why would "A" be converted into the stream 1010?

Be a part of the DaniWeb community

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