Re: [Dev-C++] include files those with a .h?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Chris B. <ch...@cb...> - 2000-12-29 21:14:50
|
Hi Jag,
There two ways to include header (*.h) files, and it sounds like you are
using the wrong one!
1. #include <filename>
2. #include "filename"
The first version tells the compiler to look in a predetermined list of
directories for the file. This is usually used to include the standard
include files like iostream.h etc, as they are not stored in the same
directory as your source.
The second version tells the compiler to look for the file in the directory
you specify between the quotes. If you just type in the file name it will
look in the current working directory.
So, if you write your own header file, #include it with the quotes ("")
version. If it is not in the same directory as the working directory, make
sure to qualify it with the full path name.
Remember, you dont have to use the 2nd version for standard include files,
use the first #include <> version.
I hope this helps!
Chris.
----- Original Message -----
From: "jag" <won...@th...>
To: "devc++ mail-list" <dev...@li...>
Sent: 29 December 2000 01:29
Subject: [Dev-C++] include files those with a .h?
> ok i've got my dev cpp ver 4.0 ready to boogy with!
>
> cos i'm a novice at the moment bear with me..simple questions first.
>
> all the include files for a program end with .h correct?
>
> so when you compile a program and it has errors saying it can not find the
> .h files you have them stored on the hard drive in the wrong place!
>
> So saying that do all the include files have to be in the dev cpp include
> directory? or is there a simpler easier way to go about it?
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
>
|