Dies anyone know the algorithm to turn a ascii text into binary fromat. It would evwen be great if all you did was point me to a tuorial on it. I need to know it for a program I am currently working on. Thanx.
Dies anyone know the algorithm to turn a ascii text into binary fromat. It would evwen be great if all you did was point me to a tuorial on it. I need to know it for a program I am currently working on. Thanx.
I've heard people talking about this with bit swapping and stuff like that. It was for that text game ErionD made. It used like >> operators and stuff. I never did figure out how they did it or anything.
Are you trying to just encrypt something by making it binary, or do you have a special need? I'm just curious.
64 bit to be exact. i found this tutorial on it at cplusplus.com and they didn't explain how to do that ecause they said there was another tutorial on the site and there is not that I can find.
What do you mean by binary format?
ASCII is simply characters represented by a number.
if you want to get the value of a character use typecasting
cout << (int)' ' << endl; will display 32 on the screen
Do as RpiMatty says you to and then use the returning value for to feed the ultoa() function.
Now, just like he says, you may want to do this for a single character. For a string that simple ain't so unless you separate each byte of the string with a space of something. Otherwise you won't be able to get the string back... Why do you want to do this, by the way?
Regards,
Mario Figueiredo
Using Borland C++ Builder 5
Read the Tao of Programming
This advise was brought to you by the Comitee for a Service Packless World
and what header do I need to import I still consider myself a newbie. I am quite unfamilar with alot of different functions?
It's all in there. Just follow the link I gave youOriginally posted by kas2002
and what header do I need to import I still consider myself a newbie. I am quite unfamilar with alot of different functions?
Regards,
Mario Figueiredo
Using Borland C++ Builder 5
Read the Tao of Programming
This advise was brought to you by the Comitee for a Service Packless World