Example 2

 

# include <iostream.h>
# include <conio.h>

int main(void)    // how to use getch
{
   int c;
   int extended = 0;
   c = getch();

   if (!c)
   {
       extended = getch();
   }

   if (extended)
   {
       cout << "The character is extended\n";
   }

   else
   {
       cout << "The character isn't extended\n";
   }

   return 0;
}

Hosted by www.Geocities.ws

1