home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex114.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
588b
|
20 lines
// Example: 114 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
short random;
short main(void)
{
dddInitKeybd();
while (dddkeycode!=_ESC) // Terminate when the escape key is pressed.
{
if (dddkeypressed[_SPACE]) // Reset, if space bar is pressed.
{
dddResetRnd(); // Reset the random number generator.
}
random = dddRnd(); // Get a pseudo-random number.
printf("The pseudo random number is :- %d\n",random);
}
dddRestoreKeybd();
return 0;
}