Computer Science Canada

converting ascii to string

Author:  unoho [ Fri Apr 30, 2010 6:03 pm ]
Post subject:  converting ascii to string

hey guys, i was wondering how i could change a integer to a string

for example,, if an user enters 65, the computer would produce or output A and so on.

is there any built in function or method for it?

basically im doing this for a puzzle type of question where you will have to decode (number to string) and i saw my friend doing like 56different cases (using switch).. so i was hoping to come up with a much efficient way rather thn typing 52 different case statements.

any help is much appriciated Smile

Author:  TheGuardian001 [ Fri Apr 30, 2010 6:48 pm ]
Post subject:  Re: converting ascii to string

I believe simply casting the int directly to a char will work.

Author:  unoho [ Sat May 01, 2010 1:13 am ]
Post subject:  RE:converting ascii to string

wwowww...that was quite simple Razz

thank you very much Very HappyVery Happy


: