Tuesday, July 28, 2009

C++, Getting ascii values of char arrays?

I'm trying to write a program, for learning, where you type a string, then it has to convert the array into a array of int's, Its just that I don't know how to do it.

C++, Getting ascii values of char arrays?
check out http://www.pscode.com for great sample codes.
Reply:You just need to cast each char to int.





int(yourChar);





or





static_cast%26lt;int%26gt;(yourChar);

petal

No comments:

Post a Comment