Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Including Source Files
What is the result of using Option Explicit?
✍: FYIcenter
When writing your C program, you can include files in
two ways.
The first way is to surround the file you
want to include with the angled brackets < and
>.
This method of inclusion tells the preprocessor to
look for the file in the predefined default location.
This predefined default location is often an INCLUDE
environment variable that denotes the path to your
include files.
For instance, given the INCLUDE variable
INCLUDE=C:\COMPILER\INCLUDE;S:\SOURCE\HEADERS;
using the #include version of file inclusion, the
compiler first checks the
C:\COMPILER\INCLUDE
directory for the specified file. If the file is not
found there, the compiler then checks the
S:\SOURCE\HEADERS directory. If the file is still not
found, the preprocessor checks the current directory.
The second way to include files is to surround the
file you want to include with double quotation marks.
This method of inclusion tells the preprocessor to
look for the file in the current directory first, then
look for it in the predefined locations you have set
up. Using the #include file version of file inclusion
and applying it to the preceding example, the
preprocessor first checks the current directory for
the specified file. If the file is not found in the
current directory, the C:COMPILERINCLUDE directory is
searched. If the file is still not found, the
preprocessor checks the S:SOURCEHEADERS directory.
The #include method of file inclusion is often used to
include standard headers such as stdio.h or
stdlib.h.
This is because these headers are rarely (if ever)
modified, and they should always be read from your
compiler’s standard include file directory.
The #include file method of file inclusion is often
used to include nonstandard header files that you have
created for use in your program. This is because these
headers are often modified in the current directory,
and you will want the preprocessor to use your newly
modified version of the header rather than the older,
unmodified version.
2007-02-26, 6628👍, 0💬
Popular Posts:
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqu...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
Can you explain steps in function points? Below are the steps in function points: >First Count ILF, ...
How To Create an Add-to-NewsGator Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News...
.NET INTERVIEW QUESTIONS - What is Suspend and Resume in Threading ? It is Similar to Sleep and Inte...