AA225
February 2nd, 2005, 10:52 AM
hi all,
im trying to make a program that asks the user to input a series of numbers that correspond to various letters and symbols so that a words can be formed. I know how to prompt the user to enter the series of numbers but im stuck on two things:
after the user finishes entering the numbers i want "-1" to be the character to terminate the chain
i.e.
89 57 46 52 -1 <-end of message
and also how do i assign the number to letter and symbols?
i made a notepad file with all the assocation so would i just copy and paste it?
this is the key i have:
------------------------------
code char
2 = 0
16 = 1
31 = 2
92 = 3
55 = 4
67 = 5
42 = 6
1 = 7
97 = 8
32 = 9
48 = -
53 = (space=' ')
98 = !
89 = ,
79 = .
19 = ?
---------------
thats just some of it
i have just started learning c++ so i dont know all the advanced techniques to make this easier
as of now all i know is cout, cin, random values, while loop, if-else, do-while, and a bit about creating custom functions
any examples to help me get going would be greatly appreciated.
im trying to make a program that asks the user to input a series of numbers that correspond to various letters and symbols so that a words can be formed. I know how to prompt the user to enter the series of numbers but im stuck on two things:
after the user finishes entering the numbers i want "-1" to be the character to terminate the chain
i.e.
89 57 46 52 -1 <-end of message
and also how do i assign the number to letter and symbols?
i made a notepad file with all the assocation so would i just copy and paste it?
this is the key i have:
------------------------------
code char
2 = 0
16 = 1
31 = 2
92 = 3
55 = 4
67 = 5
42 = 6
1 = 7
97 = 8
32 = 9
48 = -
53 = (space=' ')
98 = !
89 = ,
79 = .
19 = ?
---------------
thats just some of it
i have just started learning c++ so i dont know all the advanced techniques to make this easier
as of now all i know is cout, cin, random values, while loop, if-else, do-while, and a bit about creating custom functions
any examples to help me get going would be greatly appreciated.