Including Source Files
What is the result of using Option Explicit?
When writing your C program, you can include files in
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
using the #include version of file inclusion, the compiler first checks the
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
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, 6010👍, 0💬
When should the register modifier be used? Does it really help? The register modifier hints to the c...
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous ...
What is the benefit of using an enum rather than a #define constant? The use of an enumeration const...
In C#, what is a weak reference? Generally, when you talk about a reference to an object in .NET (an...
How To Enter Boolean Values in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...