Thread: Ascii value

  1. #1
    Registered User
    Join Date
    May 2006

    Ascii value

    what is the ascii value for each of the 4 arrow keys?

  2. #2
    Registered User
    Join Date
    May 2006
    The arrow keys return two ascii values, first a NULL (ascii 0), and then one of the following:

    72 - up arrow
    80 - down arrow
    75 - left arrow
    77 - right arrow

    so first checked for ascii 0, and if you get that, check for a second code. Oh, and those values are in decimal, not hex.

  3. #3
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Or if you want a tutorial on using the keys just go here

  4. #4
    Registered User
    Join Date
    Mar 2006
    On my system they give 224 instead of 0!

    And I believe the only way to retrieve those codes is through getch(), which is painfully non-standard...
    #include <stdio.h>
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ASCII character with ASCII value 0 and 32
    By hitesh_best in forum C Programming
    Replies: 4
    Last Post: 07-24-2007, 09:45 AM
  2. Replies: 11
    Last Post: 03-24-2006, 11:26 AM
  3. Office access in C/C++ NOT VC++!! :)
    By skawky in forum C++ Programming
    Replies: 1
    Last Post: 05-26-2005, 01:43 PM
  4. ascii values for keys
    By acid45 in forum C Programming
    Replies: 2
    Last Post: 05-12-2003, 07:13 AM
  5. Checking ascii values of char input
    By yank in forum C Programming
    Replies: 2
    Last Post: 04-29-2003, 07:49 AM