Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

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)

0
azerty061597
Asked:
azerty061597
  • 2
1 Solution
 
psdavisCommented:
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

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now