PDA

View Full Version : How can I do that ?



Kelvin
07-10-2002, 06:00 AM
Hi everyone, I am new to here.
I am writing a program to simulate a calculator.
what I want to do is :
If the user press h or H, display the help file without pressing Enter.
Which file do I need to include ? Can you show me an example?

Traveller
07-10-2002, 06:27 PM
Check out kbhit in conio.h, heres a short ex:



char key;
if(kbhit()){
key = getch();

switch(key){
case ('h'):
case('H'):
//do stuff
break;
//ect...
}
}

Kelvin
07-10-2002, 11:08 PM
Thank you very much!!!!
but how can you know the use of that function by checking out the header file ?
There only a statement which I don't understand in the header file:
int _RTLENTRY _EXPFUNC kbhit( void );

Akilla
07-16-2002, 09:57 PM
You don't have to try to understand all the code in the header file (man... you did that ????? whooo)

anyway, how does one know what function is in what header file ?

well, if you have turbo C++ 3.0, check the help files... it will tell show you the list of functions... when you click on them, it will give all the details (what it does, how to use it, what header file you have to include, etc)

You can also download the latest (advisable) version of help files from www.borland.com ... they also give some info about the functions.

I heard that there're also books that provide this info. I don't know where/how to get them.
Does anyone know by the way ?

COOL PROGRAMS @ www.akilla.tk

Kelvin
07-17-2002, 08:59 AM
Originally posted by Akilla
You don't have to try to understand all the code in the header file (man... you did that ????? whooo)

anyway, how does one know what function is in what header file ?

well, if you have turbo C++ 3.0, check the help files... it will tell show you the list of functions... when you click on them, it will give all the details (what it does, how to use it, what header file you have to include, etc)

You can also download the latest (advisable) version of help files from www.borland.com ... they also give some info about the functions.

I heard that there're also books that provide this info. I don't know where/how to get them.
Does anyone know by the way ?

COOL PROGRAMS @ www.akilla.tk

I've checked the Turbo C++ directory, but I didn't find the help file
Can you please give out the download link?

Traveller
07-17-2002, 01:33 PM
Here you go, I think this is what you are looking for:
http://info.borland.com/techpubs/borlandcpp/v55/updates/cmd.html (http://info.borland.com/techpubs/borlandcpp/v55/updates/cmd.html/)