From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/getchar.html | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 reference/C/FUNCTIONS/getchar.html (limited to 'reference/C/FUNCTIONS/getchar.html') diff --git a/reference/C/FUNCTIONS/getchar.html b/reference/C/FUNCTIONS/getchar.html new file mode 100644 index 0000000..1b37071 --- /dev/null +++ b/reference/C/FUNCTIONS/getchar.html @@ -0,0 +1,75 @@ +getchar function + + + + +
+
+

getchar function

+
+
+

+getchar is used to read data from the keyboard ( +stdin). Effectivly +it is a fgetc(stdin).

+The problem with this function is that the characters are buffered until +RETURN is hit! This means that getchar does not see the characters +until the user presses return. The non standard function getche +gets around this problem and sees each character as it is pressed. +I have not been able to produce the same function on Linux. +The nearest I can get is by using 'curses' but it keeps clearing the screen! + +

+Library:   stdio.h
+
+Prototype: int getchar(void);
+
+Syntax:    ch = getchar();
+
+
+ + + +example program. +

+ +


+

+See also: +

+ + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf