Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie C language Header and Include files question

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
TonyBradley



Joined: Thu Jul 13, 2006 2:40 pm
Posts: 21
Location: Plymouth

PostPosted: Sat Sep 24, 2011 2:02 pm    Post subject: Newbie C language Header and Include files question Reply with quote

I'm totally new to this programming lark...

C has many functions to perform specific tasks, stored in library files.

Why does it use so many different library files? Surely it would make more sense to store them all in one file, negating the need to remember which header and include files to place in your code!

Is there a way to learn which files store which functions, and where they are stored?
Back to top
View user's profile Send private message Send e-mail
larcky



Joined: Sun Nov 21, 2010 6:28 pm
Posts: 19
Location: England

PostPosted: Sat Sep 24, 2011 6:29 pm    Post subject: Reply with quote

Hi
Quote:
Surely it would make more sense to store them all in one file

No because then that file would be HUUUUUUUUUUUUUGE!!! and impossible to maintain.
You'll soon get used to it.

Quote:
Is there a way to learn which files store which functions, and where they are stored?

You can always just browse through the headers themselves (in /usr/include) to see what they're up to. Or if you know what a function's called but don't know where it is, there's an excellent reference section at http://cplusplus.com.
If you're after a good reference book have a look here:
http://www.amazon.co.uk/Reference-Manual-Samuel-P-Harbison/dp/013089592X/ref=sr_1_14?ie=UTF8&qid=1316884734&sr=8-14
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast