Should I use scanf instead? or fgets or something else? I have no idea.
Type: Posts; User: matthew82
Should I use scanf instead? or fgets or something else? I have no idea.
I think I chose getch because it didn't require an enter press.
That must be why Meldreth added conio.h.
EDIT: Oh, hey Meldreth. :)
Thanks everyone. Thanks Elysia -- I see what you mean about no need for checking key there.
Here is the new code based on guesst's pseudocode:
#include <stdio.h>
int main()
{
int c;
I think I've cleared it up in this version...
#include <stdio.h>
int a;
int main()
{
Try VEDIT?
http://www.vedit.com/
Thanks so much. but I don't know how to have it display "You do not have the key." I thought it would if you pressed b before getting the key.
EDIT: oh I found that by putting "key = 1;" inside...
Hi. I'm trying to write a simple program where you need a key to open a door, and it requires you to get the key before opening the door. I'm getting some errors. This is what I have so far:
...