|
From: Stein N. <tem...@of...> - 2001-01-19 07:10:37
|
Well, for the exampleprogram that you refered to, it isn't necesary to use a
switch... but anyway, mail me if you need to anyhow.
Here how to do some key-stuff:
#include <stdio.h>
#include <conio.h>
void main(void)
{
int keydown=3D0;
while(keydown !=3D 27) /*While ESC-key is NOT pressed!*/
{
keydown =3D getch(); /*Store the keypress-value*/
printf("%c", keydown); /*Print the key-press-value*/
}
}
----- Original Message -----
From: Frazell Thomas
To: Dev...@Li...
Sent: Wednesday, January 17, 2001 2:18 PM
Subject: [Dev-C++] Switches
I was referred to use this instead of if / else statements I=92m trying to
understand how to use it I have read the article on MSDN I ask can someone
write a small program that will get the variable from the keyboard and a small
action for instance if you enter 1 it says the number 1 detected or Z would
say the letter z detected as when I see this in use I can fully understand how
to use it thanks :O)
-------------
#define stone
|