I finnaly found a safe way to do it here it is


Code:
int x;

x = getch();

if ( x == 0x48 ) {}   // up

else if ( x == 0x4B ) {}  // left

else if ( x == 0x50){} // down

else if ( x == 0x 4D) {} // right
hope everyone finds this usefull as i also found it very usefull ^^