View Single Post
  #2 (permalink)  
Old February 24th, 2004, 02:55 PM
pradeep_itguy pradeep_itguy is offline
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can convert the string to array of integers, not integer.
i.e. if you have a string "ABC", you can convert the string to its euivalent ASCII array as {65,66,67}.

This you can do directtly as given below.

char *st = "ABC";
int ascii[3];
ascii[0] = st[0];
ascii[1] = st[1];
ascii[2] = st[2];

I think this answers your question.

Regards
Pradeep P


It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
Reply With Quote