Mail Archives: djgpp/1998/04/21/18:30:23
aalfonso wrote:
>
> One of the examples in the book I'm reading on C++ demonstrates a class
> declaration written as a header file and then included in a .cc file that
> implements it. The program compiled successfully once I copied the header
> file into the INCLUDE directory of DJGPP-I guess this is where the compiler
> automatically looks for header files. Would this be the usual and correct
> way to compile a program with your own header file or is there another way?
> Are there command line switches that will direct the compiler to other
> directories?
You should never put your own header files into the DJGPP include
directory! To include a user header file, simply use "" around the name
instead of <>, which will tell the compiler to look in the current
directory for the file. Example:
#include <iostream.h>
#include "myheader.h"
If your C++ book doesn't tell you this, burn it and get a new one.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| "Starting flamewars since 1993" | http://www.cs.com/fighteer/ |
| *** NOTICE *** This .signature | ICQ UIN#: 7406319 |
| is generated randomly. If you don't like it, sue my computer. |
---------------------------------------------------------------------
- Raw text -