|
| ||||||||||
| Tags: c language, directive, file inclusion, preprocessor |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| What are the File Inclusion directives in C?
|
|
#2
| ||||
| ||||
| File Inclusion directives
Hi, I think atleast you heard about the preprocessor directives. A File Inclusion Directive is the preprocessor directive. File Inclusion directive causes the preprocessor to replace the directive with the contents of the specified file. File Inclusion directives are represented by the #include. File Inclusion directives has the following syntax : >>-#include--+-<filename>-+------------------------------------>< '-"filename"-' |
|
#3
| ||||
| ||||
| Usage : File Inclusion directives
Hello, I suggest you to use the File Inclusion directives when you are working on the large project that contains large number of lines. So, If there are a number of declarations used by several other files then you can place all these definitions in one file and #include that file in each file that uses the definitions. For example : #include <stdio.h> #include "myheader.h" Hope you understand form the above example. |
|
#4
| ||||
| ||||
| Directives in C :
I think you have to go through the following code of lines that will help you. Example : The following file defs.h contains several definitions and an inclusion of an additional file of declarations: /* defs.h */ #define TRUE 1 #define FALSE 0 #define BUFFERSIZE 612 #define MAX_ROW 77 #define MAX_COLUMN 90 int hr; int mins; int secs; #include "mydefs.h" You can also embed the definitions that will appear in defs.h with the following directive: #include "defs.h"
__________________ Grand Theft Auto 4 PC Video Game |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "What are the File Inclusion directives in C?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inclusion Property in Multilevel Caches | Charioteer | Motherboard Processor & RAM | 4 | 22-09-2010 02:53 PM |
| What is the core php.ini directives? | Dwarner | Software Development | 4 | 27-02-2010 11:25 PM |
| What are the conditional compilation directives in C? | Tailor | Software Development | 3 | 22-01-2010 07:56 AM |
| What are the Miscellaneous directives in C? | D-Mon | Software Development | 3 | 21-01-2010 08:49 AM |
| Paint.NET inclusion of a graphic into a PPT presentation | CLONEOPS | Windows Software | 3 | 21-11-2008 04:19 PM |