Thread: how can i see it

  1. #1
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804

    how can i see it

    halo all,
    i just want to know if it is possible to view the header files like stdio,stdlib,string etc.i want to see the prototype declarations inside it.
    Thanks

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    278
    Your compiler should have an include folder somewhere that has all the header files in it.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Bladactania View Post
    Your compiler should have an include folder somewhere that has all the header files in it.
    Those don't have the actual code in them tho (the code was compiled into library objects already). You probably don't have the C source installed by default (the source for your compiler may not be open either! if it is available, you probably have to download it).

    edit: sorry, the OP just asked for the prototypes; those are in the headers.
    Last edited by MK27; 04-24-2009 at 09:24 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    GNU C Library - GNU Project - Free Software Foundation (FSF)

    To see an implementation of the standard library.

    If all you want is the prototype declarations though, your system has them somewhere. Check what directories your compiler is including and search there.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    See if you can compile your program with the "-P" option (iff the compiler supports it).
    Afterwards view the resultant .i file that the preprocessor generates.

  6. #6
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    i'm using visual studio 2005.where can i see in it,i mean which directory.

  7. #7
    Registered User
    Join Date
    Feb 2009
    Posts
    278
    Look in the Installation Directory. For me it's c:\program files\MS Visual Studio 8\VC\include

  8. #8
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Thanks for all the help.i've seen the include folder.
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

  9. #9
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    If you're using Visual Studio, then all you need to do is right click on the header name in your source file and select the first option "Open Document <whatever>" where <whatever> is the name of the header file you wish to open.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  10. #10
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Thanks hk_mp5kpdw. That was cool. also i've a question regarding visual studio.how can i use its help efficiently. suppose that i want to know about any standard library function( like malloc,swab etc) how can i get it. in turbo c++ pressing CNTRL+F1(after placing the cursor undre the function) gives the information regarding the function, is there any such shortcut in visual studio.any help would be appreciated.
    Last edited by BEN10; 04-25-2009 at 10:02 PM.
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

  11. #11
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    In most cases, you can just click on the function name in your source file (doesn't need to be highlighted or anything like that, just so the cursor has been clicked somewhere within the name) and press F1.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  12. #12
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Quote Originally Posted by hk_mp5kpdw View Post
    In most cases, you can just click on the function name in your source file (doesn't need to be highlighted or anything like that, just so the cursor has been clicked somewhere within the name) and press F1.
    i did this for printf but it opens the help page with an error.
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

Popular pages Recent additions subscribe to a feed