Hi
Before I say anything, I think that you must know that I am very new to c++. I have not worked with it a long time.
So...
I try to do a program that will change each letter in a text to a specific number.
My though is something like this
A=1
B=2
C=3
D=4
And so on...
then you enter a text, for example "Hi my name....." will show as "8,9, 13,25, 14,1,13,5,......"
I am not totally dumb and I think I will understand if some of you guys can explain whats the best way I should go if I do this kind of program.
There's more than one way to skin this cat. You can either have a gargantuan switch (don't do it), or subtract a constant amount from the letters' ASCII values. You can search Google for an ASCII table to reference.
*Edit - consider also using the to_upper or to_lower standard methods to simplify your input.
*Edit2 - You can also do it by shifting some bits. :)
In case you don't already know this soprot, all characters are already essentially just numbers, as each has a unique ASCII value. That wasn't really explained above. So as Luc Lieber said, all you have to do is use the topuuer function on a char variable containing a letter, then subtract 64 to get a number between 1 and 26
Thanks very much. I actually made it trough. my programis almost done, but now im facing a new problem. How do i copy text from my running program (batch file) and paste it into another program (also running as a batch). ??