1. ## Ascii to hex

How can I convert a string to the hexadecimal equivelant?

and then be able to convert it back?

Using the C++ style of strings

2. what equivalent? Is the string a number or?

3. its like alpha characters (I'm trying to write my own excryption method)
I think it goes like
Code:
```Encrypt(string)
{
string Encrypt(string);
int Length;
int Length2;

Length=(string-length(Encrypt);
Length2=Length*2;

inline bool atlHexEncode(
const BYTE *Encrypt,
int Length,
LPSTR HexEquiv,
int * Length2
)
throw();```
Of course its not finished yet, have alot of other things to do in the function

4. I want it to go kindof like
Input
|
Convert to Hex
|
Reverse String example: ag to ga
|
Convert to my own Table (Need to learn how to make one)
|
Multiply by random number 2 digits long
|
Store that random number as the 3rd and 4th characters in the string (but dont delete the other part of string)
|
Divide By random Number 3 digits long
|
Store that random number after the 5th character in the string (but dont delete the other part of string)
|
Divide new string by 5
|
output.

5. Of course its not finished yet, have alot of other things to do in the function
You have so many errors in the code you posted, it's not worth going over. I suggest you get a beginning C++ book.

How can I convert a string to the hexadecimal equivelant?
Data is stored on a computer in only one way: binary. There is no converting anything to anything else.

6. I know I already corected themthat I could see(prob more), guesss you started the post before I did
I guess I didnt follow http://msdn.microsoft.com/library/de...lhexdecode.asp right?

I ment converting AB to (A equivilant)(B equivilant)

7. You want each character to be converted to its character code and that code converted to hex? So "Go" would convert to 47 6F?

If that is the case, each character in the string is still a character with the character code as its value. You can use a loop that treats each character as an integral value and then convert that to a string in hex format. You can do this with a stringstream, sprintf or other ways.