Hi guys and happy New Year,
Where I can find explanations for includes in C programming language?
There is a lot of functions and it would be good to know some.
Thanks and once again happy New Year! :p
9 replies to this topic
#1
Posted 04 January 2012 - 05:31 AM
|
|
|
#2
Posted 04 January 2012 - 05:36 AM
There's not much to explain about includes. When the compiler's preprocessor sees #include in the C source file it just opens the named file and processes it; when done processing the include it returns to the C file. Includes often contain includes. The compiler will treat all include files as if you had written then yourself. It makes your job as a coder a great deal easier to just include standard header files than it would be if you had to code them all over, and over, and over again.
One crevet -- do not put executable code in an include file. They should only contain function prototypes, typedefs, structures, and defines. (There are a couple exceptions which will become clear as you learn more about C language.)
One crevet -- do not put executable code in an include file. They should only contain function prototypes, typedefs, structures, and defines. (There are a couple exceptions which will become clear as you learn more about C language.)
#include <stdio.h> #include <stdlib.h> #include <string.h> // your program's code does here
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
#3
Posted 04 January 2012 - 05:37 AM
Think my post we're usefull? Please take your time and press the Like button at my post, Big Thanks!
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
#4
Posted 04 January 2012 - 05:45 AM
No,no!
I know what is include and that stuff. I just want to know what functions I can find e.g. in <stdio.h> or <math.h>. For those two I know what functions are inside but I dont know what fuunctions are inside <getopt.h> and others.
Do you understand now?
I know what is include and that stuff. I just want to know what functions I can find e.g. in <stdio.h> or <math.h>. For those two I know what functions are inside but I dont know what fuunctions are inside <getopt.h> and others.
Do you understand now?
#5
Posted 04 January 2012 - 05:56 AM
You should look at the documentation of the header you are intrested in to know the functions of For example: getopt.c File Reference This is when i googled "C getopt reference"
I know that C# have its own site for reference all the classes available, Im not soo experienced with C
I know that C# have its own site for reference all the classes available, Im not soo experienced with C
Think my post we're usefull? Please take your time and press the Like button at my post, Big Thanks!
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
#6
Posted 04 January 2012 - 06:25 AM
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
#7
Posted 04 January 2012 - 06:53 AM
I thougth there is a much more functions but its not.
#8
Posted 04 January 2012 - 11:56 AM
If you want to know what functions are inside a file then just open the file with any text editor and read it. An alternative is to buy a good book that contains most of them which lists functions either alphabetically or by functionality.
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
#9
Posted 04 January 2012 - 12:18 PM
Is there any book like that?
#10
Posted 04 January 2012 - 12:18 PM
Whatever C library you use may have a lot of supporting functions (possibly dozens of macros and functions for working with files) that you are not supposed to use on their own. The ones documented are usually the goodies that are well tested, work, and should work on other platforms.
edit:
Most good books should have a short reference area for functions with possible descriptions, however online references work just the same and are usually newer.
edit:
Most good books should have a short reference area for functions with possible descriptions, however online references work just the same and are usually newer.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









