I am having problems with getch() and putch(), and I would like to know how to properly use it. I tried doing this:
I recieved multiple errors and warnings. Please explain on how to properly use getch() and putch(), my C book is not very good...
- Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
main()
{
char a[5];
printf("Is your printer on? y/n: ");
getchar(a);
if (a == 'n')
{
printf("I'll wait. Press Enter when you have it on...\n");
getchar(a);
}
system("PAUSE");
return 0;
}
I recieved multiple errors and warnings. Please explain on how to properly use getch() and putch(), my C book is not very good...