|
From: <jos...@ya...> - 2001-03-30 06:51:09
|
I found these definitions in my archive
**********************************************************************
There are two slightly different formats for file inclusion: one using
"" and the other using <>
1) #include <myfile.h> says to look in established system directories
for the file to include. How these system directories are established
and where they are located is system dependent; that is, it depends
upon the system on which you are working.
2) #include "myfile.h" says to look in your current directory for the
file. If not found there, the preprocessor will look in the system
directory. This is not necessarily true for all
compilers/preprocessors.
*********************************************************************
This is from WinAPI
The #include directive causes resource compiler to process the file
specified in the filename parameter. This file should be a header file
that defines the constants used in the resource-definition file. Use
the statement
#ifndef RC_INVOKED
in your header file to surround statements that can be compiled by a C
compiler but not RC. This way, you can use the same include files in
your .C and .RC files.
Syntax
#include filename
Parameter
filename
Specifies the name of the file to be included. If the file is in the
current directory, the string must be enclosed in double quotation
marks; if the file is in the directory specified by the INCLUDE
environment variable, the string must be enclosed in less-than and
greater-than characters (<>). You must give a full path enclosed in
double quotation marks (") if the file is not in the current directory
or in the directory specified by the INCLUDE environment variable.
Example
This example processes the header files WINDOWS.H and HEADERS\MYDEFS.H
while compiling the resource-definition file:
#include <windows.h>
#include "headers\mydefs.h"
**********************************************************************
As a rule of thumb I can say
1) If you're including headers from the compiler/stl/etc use <>
2) If you're including your own header files use ""
Hope this clarifies
Chemanuel
--- Michael Potter <mdp...@ya...> wrote:
> I believe that the <> will search for the file in the
> include directories as specified in Dev_C++.
>
> The "" will use the systems (windows) path resolution.
>
> Anyone else have a better definition?
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
|