Function available on char type...

I need a function to use on char type...

I need one to get the ascii code from a char...
(pex: ord('A')=65 or something like that)

azerty061597Asked:
Who is Participating?
 
psdavisConnect With a Mentor Commented:
How about?

int iAscii = (int) 'A';

or

int iAscii = __toascii( 'A' );

Phillip

0
 
Booth882Commented:
int CharToInt(char TheChar)
{
    int TheInt = TheChar;
    return TheChar;
}
0
 
Booth882Commented:
whoops!  I mean

return TheInt;
0
 
ozoCommented:
Not that it matters....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.