470,630 Members | 2,107 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,630 developers. It's quick & easy.

Multiple File Inclusion Problem

I have some idea but i am puzzled.
As i understand, file inclusion problems like x includes y and y in turn includes x etc. can be avoided by #ifdef preprocessor checks.
Can you please explain with detailed examples on scenarios which result in Multiple File Inclusion problems?

The best way i employ is :
Let us say we have 4 files:
x.h y.h
x.c y.c

x.h includes y.h.
Now if y also needs x then y.c includes x.h thus avoiding problems during file inclusion.
Please help me out in this case.
Dec 5 '07 #1
1 975
Hi ,

To have a better understanding try the following link. There is really good stuff.

http://www.gamedev.net/reference/articles/article1798.asp

If you need some more examples then let me know, I also once puzzeled and so made a few programs which made my confusion clear.

Regards,
Raj Kumar Arora
Dec 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Jochen Zeischka | last post: by
6 posts views Thread by techBoy | last post: by
22 posts views Thread by maxwell | last post: by
10 posts views Thread by zfareed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.