Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > help with heade...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 24823 of 27670
Post > Topic >>

help with header files..

by johnnash <johnnash86@[EMAIL PROTECTED] > Mar 5, 2008 at 11:30 PM

ok so i was just reading about #ifndef and header files. I have a few
doubts. It would be great help if someone can clear my doubts..

#ifndef A_H
#define A_H
....
code
.....
#endif

^^ lets say A.h is included in B.h which is included in C.h..so how
will the compiler resolve everything ??

also i saw some programs where there are many files like a.h, a.c,
b.h, b.c, c.h, c.c etc and then there is a all.h file
 which goes like this -

#ifndef A_H
#include "a.h"
#endif

#ifndef B_H
#include "b.h"
#endif

#ifndef C_H
#include "c.h"
#endif


then only all.h is included in a.c, b.c and c.c

how did it work ??
 




 4 Posts in Topic:
help with header files..
johnnash <johnnash86@[  2008-03-05 23:30:15 
Re: help with header files..
Nick Keighley <nick_ke  2008-03-06 00:06:23 
Re: help with header files..
SM Ryan <wyrmwif@[EMAI  2008-03-06 18:19:47 
Re: help with header files..
Thad Smith <ThadSmith@  2008-03-07 23:33:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 22:03:18 CDT 2008.