-
include files
heya,
i have a c++ header in *.h format. I have put
#include <iostream.h>
#include <fareylist.h>
but am given the error: unable to open include (referring to fareylist.h>
i am running the borland turbo c++ compiler.
My question is what is the difference between #include <iostream.h> and plain #include <iostream>
is it legal to write #include "iostream.h"?
and what could be the causing my error with the unable to open include?
The files are all saved in the same directory so i presumed it should be in my path, but im not sure.
tia
-
<iostream.h> is the old header and is no longer fully supported by most modern compilers, but <istream> follows the new standards...
-
thanks for your reply.
what about the fareyList.h which is causing the error? is it path related although their all in the same folder?
is the #include "fareyList.h" legal? if so is it equivalent to #include <fareyList.h>?
cheers
-
If the header file is in the same folder/directory as the source that you are compiling, then you should be using #include "fareyList.h". You use <> when you reference header files that come with your compiler, ones that are located in a specific folder when you installed your compiler. By trying to do it that way, you are telling the compiler to look for your header file in the wrong location. It can't find it in that location so it spits out that "unable to open" line. The two are not equivalent.
-
fantastic reply. thanks, answered exactly what i was after.
-twans