Solved

# cancatinating numbers using ascii representation

Posted on 2004-11-21
227 Views
i dont know if this should be on another question but the encyption is based on the ascii representation
Like A is 95
i figgure that i can mod 95 and get 5 returned add 7 to it mod by 10 and get a result

then take 95 aggain and divide it by 10 and get  9 and add 7 to it mod 10 and get a result

then i need to cancatinate these together

am i going to have problems with the types do i need to cast between these and what do i need to make them to be able to cancatinate.

Also is it just going to recognise the ascci character as 95 or do i have to somethin for it to
0
Question by:tedschnieders

LVL 1

Expert Comment

I have no idea what you are trying to do here.

Perhaps a clearer explaination of the problem and the proposed solution might help?

Ciao

SirHando

0

Author Comment

sorry bout that

i am trying to encyprt words passed into a function based on the scheme
example
word: ANT

charater A
ascii 95

9 + 7 mod 10 = 6
5 + 7 mod 10 = 2

encrypted charater
is >

character N
ascii 78

7 + 7 mod 10 = 4
8 + 7 mod 10 = 5

encypted character
is -

character T
ascii 84

8 + 7 mod 10 = 5
4 + 7 mod 10 = 1

encypter character 3

so ANT would = >-3

well the words passed in are going to be strings  like on the example T how do i cancatinate my resultes 5 and 1 together and get that character representaion do i have to cast  so i can cancatinate

hopefully thats more clear
thanks

0

LVL 55

Expert Comment

0

LVL 1

Accepted Solution

thanks, i have followed in other thread.
0

## Featured Post

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.