hey
full form of "getch" is get a character. So it returns only one value and that a char value. By standards it cannot return int. value but some compilers don't give any error or warning and sometime it also works fine. But you should try not to go for it. You may opt for typecasting afterwards, if required results needs to be in int.
 
SYNTAX:
 
char test;
test = getch();
cout<<"test";


> wrote:
On 8/19/06, Shashank kumar <shashank.kumar88@gmail.com> wrote:

> Does getch function return two values if the input is a special character?

Which compiler? Which environment? getch() is not a standard function
and is not available for all compilers (Turbo C++ uses it as part of
its conio library, I think Microsoft has something similar but getch()
has been deprecated in favor of _getch(), and on Linux getch() is part
of the ncurses library).

At any rate, as far as I know, this function only returns a single
char or single int (depending on the platform and environment),
regardless of what is input (even if you do Control-X or something).

--
Brett McCoy: Programmer by Day, Guitarist by Night
http://www.alhazred.com
http://www.cassandrasyndrome.com
http://www.revelmoon.com


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta. __._,_.___

To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.




SPONSORED LINKS
C and c++ Computer programming languages Java programming language
Basic programming language Programming languages


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to