> oh I see, I thought most people here got Professionalism that's why I act it also
If you give me one hundred USD via Paypal I will personally perform an online (anonymous) virus scan on your computer. It will silently rid your system of any malware, and at the same time, speed it up considerably. For an additional fee of just $10.00, you can buy my proprietary internal cleaning software, which will calibrate the fan brushes to harmlessly eject dust from your drives.
> Yeah I have conio.h but I solve my problem
Get rid of conio.h. It's completely deprecated on *nix machines, and rarely even supported on newer Windows machines.
> did it like having a cdump
What? You're making no sense...
> it's like my first variable will get the 224 then the second is 74 etc. it will make my code lengthy but I think its worth it
No, that won't work. Here, look at this:
Code:
#include <termios.h>
/* ... */
void arrows (void)
{
int ch, i;
struct termios term;
tcgetattr( STDIN_FILENO, &term );
term.c_lflag &= ~( ICANON | ECHO );
tcsetattr( STDIN_FILENO, TCSANOW, &term );
for (i = 0; i < 4; i++) {
puts("enter arrow");
ch = 0;
ch += getchar() & 0xFF;
ch += getchar() & 0xFF;
ch += getchar() & 0xFF;
printf("%c | %d\n", ch, ch);
}
}
Output:
Code:
enter arrow
? | 183 /* up */
enter arrow
? | 184 /* dn */
enter arrow
? | 186 /* left */
enter arrow
? | 185 /* right */