Reputation:
I have a program like this:
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{
for (int i = 0; i < 10; i++)
{
cout << int (_getch ()) << endl;
}
_getch ();
return 0;
}
If I press keys like digits, alphabets and Enter, a single integer is displayed (per iteration of the loop). However, if I press keys like Insert, Delete, or the arrows, two integers are displayed at once.
Why does this behaviour occur?
Upvotes: 2
Views: 305