Thread: How can I do that ?

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    85

    How can I do that ?

    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?

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    317
    Check out kbhit in conio.h, heres a short ex:
    Code:
    char key;
    if(kbhit()){
         key = getch();
         
         switch(key){
                   case ('h'):
                   case('H'):
                               //do stuff
                               break;
                    //ect...
           }
    }

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    85
    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 );

  4. #4
    Akilla
    Guest

    whoo

    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

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    85

    Re: whoo

    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?

  6. #6
    Registered User
    Join Date
    May 2002
    Posts
    317
    Here you go, I think this is what you are looking for:
    http://info.borland.com/techpubs/borlandcpp/v55/updates/cmd.html

Popular pages Recent additions subscribe to a feed