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
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
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
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.
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.
i'm using visual studio 2005.where can i see in it,i mean which directory.
Look in the Installation Directory. For me it's c:\program files\MS Visual Studio 8\VC\include
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
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
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
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
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