TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Robert A. Hengstebeck 76417,2751 (X)
from: Pete Lyall 76703,4230
date: 1992-03-31 02:58:27
subject: #14724-#getkey problem in C

#: 14735 S3/Languages
    31-Mar-92  02:58:27
Sb: #14724-#getkey problem in C
Fm: Pete Lyall 76703,4230
To: Robert A. Hengstebeck 76417,2751 (X)

The problem seems to be that you're passing 'vlu' to getkey() by VALUE... that
is, you're sending a clone of VLU, but not VLU itself.

In order to do what you want, you weel need to pass a pointer to VLU, ala:

     getkey(&vlu)

and then down in getkey() (note declaration of vlu):

 int getkey(vlu)
 int *vlu;
        {
        *vlu = inkey();
         ....
        }

Pete

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.