Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert a character to its ascii code
#1
I am looking for a function which converts a character to it equivalent ascii code, i.e. "a" to 97. Could you please advise?
#2
Like in C++. A string is array of bytes, and array elements are accessed using [].

str "a"
int c=a[0]

or

int c='a'
#3
Many thanks for an accurate, valid and prompt reply, actually as usually with Gintaras


Forum Jump:


Users browsing this thread: 1 Guest(s)