Thread: knowing what functions are in a header file

  1. #1
    samurai warrior nextus's Avatar
    Join Date
    Nov 2001
    Posts
    196

    Question knowing what functions are in a header file

    hi!

    in visual basic you can open a .bas file and know the functions and know what it does. i open a windows.h file and look for the Sleep() function but i cant find it. I use it all the time....All i see is some wierd stuff....Thanks....

  2. #2
    Unregistered
    Guest
    header files in C++ typcially just show you how to use the function, not how the function is implemented. The implementation business is usually in a cpp file, if you write it, or a library file (which will be in binary or hexadecimal) if it is a commercial header.

  3. #3
    samurai warrior nextus's Avatar
    Join Date
    Nov 2001
    Posts
    196
    i know that. pretend i have some file called blah.h i need to know what functions are in it to use it.......how do i find that out
    nextus, the samurai warrior

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    The function bodies are usually stored in compiled OBJ and/or LIB files. You cannot open them.

    To know how to use the functions, look in the *.h files (at least you see the syntax) or in the documentation.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  5. #5
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    In a header file usually the definitions are stored. So you won't find functions in header files. You can find prototypes of the function in it. These functions are actually stored in libraries. You should check the documentation of your library to see what's in it and how to use it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with file pointer in functions
    By willie in forum C Programming
    Replies: 6
    Last Post: 11-23-2008, 01:54 PM
  2. #include header files or .cpp files?
    By DoctorX in forum C++ Programming
    Replies: 3
    Last Post: 12-23-2006, 12:21 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  5. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM